Automatic focusing apparatus

ABSTRACT

An automatic focusing apparatus repetitively detects a defocus amount of a photographing lens, discriminates whether or not an object is moving, and calculates a pursuit correction amount for a moving object on the basis of present and previous defocus amounts. When a non-moving object is discriminated, a drive amount of the lens is calculated on the basis of the present defocus amount, and when a moving object is discriminated the drive amount is calculated on the basis of a pursuit drive amount as a sum of the present defocus amount and the pursuit correction amount. A pursuit enable/disable determining device determines whether the drive amount is calculated on the basis of the discrimination result or on the basis of the present defocus amount. When a drive direction of the lens is reversed, the pursuit enable/disable determining device causes calculation of the drive amount of the photographing lens on the basis of the present defocus amount for driving the lens in a predetermined number of drive operations after the reversal.

This is a division of application Ser. No. 07/825,810 filed Jan. 21,1992, which is a continuation of application Ser. No. 07/727,382 filedJul. 5, 1991, which is a continuation of application Ser. No. 07/453,203filed Dec. 26, 1989, which is a continuation of application Ser. No.07/350,463 filed May 11, 1989, all now abandoned.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an automatic focusing apparatus for acamera or the like.

2. Related Background Art

In a known so-called pursuit or follow-up drive technique. In thistechnique, a defocus amount of a photographing lens is repetitivelydetected, and it is determined on the basis of the present and previousdefocus amounts whether or not an object to be photographed is moving.If it is determined that the object is moving, a correction amount forcorrecting the position of the photographing lens with respect to themoving object is calculated on the basis of the present and previousdefocus amounts, and a drive amount of the photographing lens iscalculated on the basis of a sum of the defocus amounts and thecorrection amount, thereby driving the photographing lens with respectto the moving object without being delayed. For example, this techniqueis disclosed in Japanese Patent Laid-Open (Kokai) No. 60-214325 filed bythe present applicant.

In the conventional technique described above, when the drive directionof the photographing lens is reversed, the following problem is posed.

Since an initial drive operation of the photographing lens immediatelyafter reversal includes backlash of a drive system, a difference betweenan estimated drive amount and an actual drive amount is produced. Thus,although the photographing lens is moved by the estimated drive amountin discrimination of the moving object after the initial driveoperation, a defocus amount corresponding to the difference is detected.In the conventional technique, it is erroneously determined that thisdefocus amount is caused by movement of the object. Thus, the pursuitdrive operation for the moving object is performed, and hence, thephotographing lens overruns from an actual in-focus position.

In particular, the backlash amount and the defocus amount are amounts onthe same order near the in-focus position, and the photographing lensengages in hunting around the in-focus position due to the pursuit driveoperation and cannot be easily converged to the in-focus position.

When the drive direction is reversed, backlash data stored in a ROMincorporated in the lens is read out to correct the backlash of thephotographing lens, and the above drawback can be alleviated to someextent.

However, the backlash amount varies even in identical types of lenses,and changes over time. Thus, the conventional drawback cannot becompletely eliminated.

SUMMARY OF THE INVENTION

An object of the present invention is to overcome the foregoingconventional drawback and to provide an automatic focusing apparatuswhich can perform an accurate pursuit operation even when a conditionsuch as backlash is variable.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a first embodiment of the presentinvention;

FIG. 2 is a perspective view of an AF module;

FIGS. 3 and 4 are operation timing charts of the embodiment of thepresent invention;

FIGS. 5 and 6 are flow charts of programs of a main CPU;

FIGS. 7 to 9, FIGS. 11 to 13, FIGS. 16 to 17B, and FIGS. 22 to 27 areflow charts of programs of an AF CPU;

FIGS. 14 and 15 are graphs for explaining a focusing calculation;

FIG. 10, FIGS. 18A and 18B, and FIGS. 19 to 21B are graphs forexplaining programs of the AF CPU;

FIG. 28 is a chart for explaining a conventional pursuit operation;

FIGS. 29A and 29B are graphs showing paths of a photographing lens whenfocal points of the photographing lens are different in a secondembodiment of the present invention;

FIGS. 30A, 30B, and 30C and FIGS. 31A, 31B, and 31C are respectivelydiagrams and flow charts for explaining an arrangement of a thirdembodiment of the present invention;

FIGS. 32A and 32B are charts showing paths of a photographing lens withrespect to a moving object when a release operation is performed andwhen it is not performed;

FIG. 33 is a chart for explaining the principle of a fourth embodimentof the present invention;

FIG. 34 is a flow chart showing the operation of the fourth embodiment;

FIG. 35 is a graph showing a path of an image surface of an object and apath of an estimated focusing surface;

FIG. 36 is a graph showing an image surface path when an object ismoving away;

FIGS. 37 and 38 are flow charts showing a modification of the fourthembodiment for calculating an acceleration component; and

FIG. 39 is a chart showing paths of an image surface and an estimatedfocusing surface together with storage, calculation, and lens drivecycles and an exposure operation including, e.g., a mirror-up operation.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment)

FIG. 1 shows an embodiment in which the present invention is applied toan interchangeable lens type single-lens reflex camera. .Aninterchangeable lens 10 can be detachably mounted on a camera body 20.

When the lens 20 is mounted, a photographing beam from an object passesthrough a photographing lens 11 and some components are reflected by amain mirror 21 arranged in the main body 20 to be guided to a finder(not shown).

The remaining components of the photographing beam are transmittedthrough the main mirror 21 and reflected by a sub mirror 22 to be guidedas a focusing beam to an auto-focus module (to be referred to as an AFmodule hereinafter) 23.

FIG. 2 shows an arrangement of the AF module 23.

In FIG. 2, the AF module comprises a focusing (AF) optical system 24consisting of a field lens 27 and a pair of re-focusing lenses 28A and28B, and a CCD (Charge-Coupled Device) 25 having a pair oflight-receiving portions 29A and 29B.

In the above arrangement, light beam components passing through a pairof regions 18A and 18B symmetrical about an optical axis 17 included inan exit pupil 16 of the photographing lens 11 form a primary image nearthe field lens 27, and form a pair of secondary images on the pair oflight-receiving portions of the CCD 25 by the field lens 27 and there-focusing lenses 28A and 28B. When the primary image coincides with afilm conjugate surface (not shown), relative positions of the pair ofsecondary images on the CCD 25 in the alignment direction of thelight-receiving portions become predetermined values 10 determined bythe arrangement of the AF optical system. Each of the pair oflight-receiving portions 29A and 29B consists of n light-receivingelements a_(i) or b_(i) (i=1 to n). The light-receiving elements arearranged so that outputs of the corresponding light-receiving elements(a₁ and b₁, a₂ and b₂, . . .) are equal to each other when the primaryimage coincides with the film conjugate surface.

When the primary image is formed on a surface offset from the filmconjugate surface, the relative positions of the pair of secondaryimages on the CCD 25 are changed from the predetermined values when theprimary image coincides with the conjugate surface in accordance with anoffset direction of the optical axis direction of the primary image(i.e., near-focus or far-focus). For example, in the case of near-focus,the positional relationship between the pair of secondary images isrelatively widened, and in the case of far-focus, it is narrowed.

The light-receiving elements a_(i) and b_(i) forming the light-receivingportions 29A and 29B comprise charge-storing elements such asphotodiodes. The light-receiving elements perform charge storage for acharge storage time according to the illuminance on the CCD 25, thusobtaining outputs of the light-receiving elements at an output levelsuitable for processing to be described later.

A description will be continued referring again to FIG. 1.

A sensor control means 26 receives charge storage start and endinstructions from a port P4 of an AF CPU 30, and supplies to the CCD 25control signals according to the instructions, thereby controlling startand end of charge storage of the CCD 25. The control means 26 supplies atransfer clock signal to the CCD 25, so that output signals from thelight-receiving elements are time-serially transferred to the AF CPU.Upon generation of the output signals from the light-receiving elements,the control means 26 supplies a sync signal to the port P4 of the AF CPU30. The AF CPU 30 causes an internal A/D converter to start A/Dconversion in synchronism with the sync signal. The AF CPU then samplesand A/D-converts the outputs from the light-receiving elements at a portP3 every cycle time of the transfer clock so as to obtain (2 n) A/Dconversion data according to the number of light-receiving elements. TheAF CPU then performs a known AF calculation (to be described later) onthe basis of the obtained data, thereby calculating a defocus amountbetween the primary image and the film conjugate surface.

The AF CPU 30 controls a display mode of an AF display means 40 usingits port P5 on the basis of the AF calculation result. For example, atriangular indicator 41 is activated in the case of near-focus; atriangular indicator 43 is activated in the case of far-focus; acircular indicator 42 is activated in an in-focus state; and a crossindicator 44 is activated when AF is impossible.

The AF CPU 30 controls a drive direction and amount of an AF motor 50 onthe basis of the AF calculation result and moves the photographing lens11 to an in-focus position.

The AF CPU 30 generates a drive signal for rotating the AF motor 50 in adirection to cause the photographing lens 11 to approach the in-focusposition in accordance with the sign (near-focus or far-focus) of thedefocus amount. The rotation of the AF motor is transmitted to acoupling 53 of the body arranged in a mount portion between the body 20and a lens 10 via a body transmission system (or XMSN) 51 consisting ofgears or the like incorporated in the body 20.

The rotation transmitted to the coupling 53 of the body is transmittedto a coupling 14 engaged with the coupling 53 and a lens transmissionsystem (or XMSN) 12 consisting of gears or the like incorporated in thelens 10, and the photographing lens 11 is finally moved to the in-focusdirection.

The drive amount of the AF motor 50 is fed back to a port P1 of the AFCPU 30 such that a rotational amount of the gears of the bodytransmission system 51 is converted to a pulse count by an encoder 52consisting of a photointerrupter or the like.

The AF CPU 30 controls the drive amount of the AF motor 50, i.e., thepulse count fed back from the encoder 52 in accordance with parameters,e.g., speed reducing ratios of the body and lens transmission systems 51and 12, thereby moving the photographing lens 11 by a predeterminedmoving amount.

The AF CPU 30 incorporates a pulse counter for counting the number ofpulses input at the port P1 and a comparison register for comparing itscontent with the content of the pulse counter. When the contents of thepulse counter and the comparison register coincide with each other, theAF CPU 30 is internally interrupted.

The AF CPU 30 controls the drive amount of the AF motor 50 in thefollowing order. Before starting of driving of the AF motor 50, the AFCPU 30 clears the content of the pulse counter, and sets a predeterminedpulse count in the comparison register.

The CPU then starts driving of the AF motor 50.

Upon rotation of the AF motor 50, the encoder 52 generates pulses, andthe pulses are counted by the pulse counter.

When the content of the pulse counter coincides with that of thecomparison register, the AF CPU is internally interrupted, and stops theAF motor by an interruption processing. In this manner, the AF motor isdrive-controlled by the predetermined pulse count. The AF CPU 30incorporates a timer for counting a time, and also has a timerinterruption function of performing an interruption every predeterminedperiod of time.

The AF CPU 30 mainly has a function of controlling the AF operation asdescribed above.

The body 20 includes a main CPU 70 for mainly controlling a camerasequence exposure operation (AE). The main CPU 70 receives informationassociated with AE such as an object luminance, a film sensitivity, anaperture value, a shutter speed, and the like at its port Q12 from an AEinformation means 85, and determines the aperture value, the shutterspeed, and the like on the basis of the AE information. The main CPU 70causes a display means 86 to display the determined information such asthe aperture value, the shutter speed, and the like via a port Q13, anddetermines them as an aperture value and a shutter speed in an exposure.

In the exposure, the main CPU 70 controls an up/down operation of themain mirror 21 by a mirror control means 81 from a port Q8.

The CPU 70 controls an aperture control means 83 through a port Q8 tocontrol an aperture mechanism (not shown) in the lens 10.

The CPU 70 controls a shutter control means 82 through a port Q9 tocontrol a shutter mechanism (not shown).

When the exposure is completed, the main CPU 70 controls a wind-upcontrol means 84 via a port Q11 to operate a wind-up charge mechanism(not shown) so as to prepare for the next exposure.

The operation of the main CPU 70 has been briefly described.

The lens 10 incorporates a lens CPU 13. The lens CPU 13 sends AEassociated information, e.g., a full aperture value necessary for themain CPU 70 and AF associated information, e.g., a rotational speed ofthe coupling 14 per unit moving amount of the photographing lens 11necessary for the AF CPU 30 onto a communication bus 64 of the bodythrough a lens contact 15 and a body contact 63 arranged at the mountportion.

The AF CPU 30 receives the AF associated information from the lens CPU13 from a port P6 connected to the communication bus 64.

The main CPU 70 receives the AF associated information from the lens CPU13 at a port Q1 connected to the communication bus 64.

The main CPU 70 and the AF CPU 30 can exchange various types ofinformation from the ports Q1 and P6 through the communication bus 64.

There are direct input/output signal (I/O signal) lines between the mainCPU 70 and the AF CPU 30 besides the communication bus 64.

An AF permission signal AF is supplied from a port Q2 of the main CPU 70to a port P7 of the AF CPU 30. The AF permission signal (AF) permits adrive operation of the AF motor 50 by the AF CPU 30 when it is ON, andinhibits the drive operation of the motor when it is OFF. The AFpermission signal (AF) is used for preventing a problem occurring whenwind-up charge control of the main CPU 70 and the AF motor driveoperation of the AF CPU 30 are simultaneously executed and exceed apower supply capacity of a power supply, e.g., a battery (not shown).More specifically, while the main CPU 70 performs the wind-up chargeoperation, the AF permission signal is set to be OFF to inhibit thedrive operation of the AF motor 50 by the AF CPU 30, thereby preventingthe wind-up charge operation and the AF motor drive operation from beingsimultaneously executed.

A mirror-up signal MR is sent from a port Q3 of the main CPU 70 to aport P8 of the AF CPU 30.

When the mirror-up signal (MR) is ON, it represents that the mirror isbeing moved upward and a transition state between the mirror up and downoperations. When the signal MR is OFF, it represents that the mirror isbeing moved downward.

The mirror-up signal (MR) is used for adjusting a drive delay starttiming after the mirror-up operation upon start of CCD storage. Arelease permission signal RL is sent from a port P9 of the AF CPU 30 toa port Q4 of the main CPU 70.

The release signal (RL) permits an exposure by the main CPU 70 when itis ON, and inhibits the exposure when it is OFF.

The release permission signal (RL) is used for adjusting a timingbetween AF pursuit operation control of the AF CPU 30 and exposurecontrol of the main CPU 70 and for inhibiting the exposure of a one-shotAF made before an in-focus state.

A release button signal RB is used for sending operation stateinformation of a release button 60, an external operation memberprovided on the body 20, to a port P10 of the AF CPU 30 and a port Q5 ofthe main CPU 70. The release button signal (RB) represents afull-depression state of the release button when it is ON, andrepresents a non-full depression state when it is OFF.

The release button signal (RB) is used for starting exposure control ofthe main CPU 70 and for pursuit operation control of the AF CPU 30.

A frame-speed mode signal DM is used for sending frame-speed modeselection state information of a frame-speed mode selection means 61, anexternal operation member arranged on the body 20, to a port P11 of theAF CPU 30 and a port Q6 of the main CPU 70.

The frame-speed mode signal (DM) represents three frame-speed modes C1,C2, and S. The mode C1 is a high-speed continuous photographing mode. Inthis mode, while the release button 60 is fully depressed, when anexposure is completed, the next exposure is immediately performed, andalmost no AF operation is performed between adjacent exposures.

The mode C2 is a normal continuous photographing mode. In this mode, atleast one AF operation is performed between adjacent exposures while therelease button 60 is fully depressed, and a frame speed is lower thanthat in the frame-speed mode C1.

The mode S is a single photographing mode. In this mode, when therelease button 60 is fully depressed, an exposure is performed once.

A focus mode signal FM is used for sending focus mode selection stateinformation of a focus mode selection means 62, an external operationmember arranged on the body 20, to a port P12 of the AF CPU 30 and aport Q7 of the main CPU 70.

The focus mode signal (FM) represents three focus modes C, O, and M. Themode C is a continuous AF mode. In this mode, the photographing lens 11continuously undergoes servo to an in-focus position on the basis of thedetected defocus amount.

The mode O is a one-shot mode. In this mode, once the photographing lens11 reaches the in-focus position, the servo of the photographing lens 11is not performed.

The mode M is a manual mode. In this mode, no servo of the photographinglens 11 is performed, and an AF result is displayed only on the displaymeans 40.

Table 1 summarizes the above-mentioned I/O signals.

The relationship between the operations of the AF CPU 30 and the mainCPU 70 and a combination of the frame speed mode and the focus mode willbe described below.

When the focus mode is the manual mode (M), since the AF CPU 30 does notdrive the AF motor 50, the AF permission signal (AF) is unnecessary forthe AF CPU 30. The AF CPU 30 starts storage of the CCD after it detectsthat the mirror-up signal (MR) of the main CPU 70 is OFF.

The main CPU 70 performs the exposure in accordance with the frame speedmode when the release button is fully depressed regardless of therelease permission signal (RL).

When the focus mode is the one-shot AF mode (O), the AF CPU 30 drivesthe AF motor 50 only when the AF permission signal (AF) is ON, and atthe same time, starts storage of the CCD after it detects that themirror-up signal (MR) is OFF. Once the photographing lens 11 reaches thein-focus position, the CPU 30 fixes display and drive operations.

The main CPU 70 can start the exposure when the release permissionsignal (RS) of the AF CPU 30 is ON and the release button signal (RB) isON.

Therefore, when the focus mode is the one-shot AF mode, the frame speedmodes C1 and C2 cause essentially the same operations.

When the focus mode is the continuous AF mode (C) and the frame speedmode is the mode C1 or S, the AF CPU 30 drives the AF motor 50 only whenthe AF permission signal (AF) is ON, and at the same time, startsstorage of the CCD after it detects that the mirror-up signal (MR) isOFF.

In this case, even after the photographing lens 11 reaches the in-focusposition, the display drive operation is updated.

The main CPU 70 performs the exposure according to the frame speed modeC1 or S when the release button signal indicates a full-depression stateregardless of the release permission signal (RL).

Therefore, when the focus mode is the mode C and the frame speed mode isthe mode C1, the main CPU 70 does not provide a time margin betweenadjacent exposures. Therefore, the AF CPU can drive the AF motor 50within a short period of time from completion of wind-up charge to thestart of next wind-up charge.

A combination of the focus mode C and the frame speed mode C2 defines aspecial mode (pursuit mode) for a pursuit operation best suitable for amoving object (to be described later). The AF CPU 30 can drive the AFmotor 50 only when the AF permission signal (AF) is ON, and startsstorage of the CCD after it detects that the mirror-up signal (MR) isOFF in the same manner as in the above-mentioned mode selection. Whenthe drive amount of the AF motor 50 is calculated, a pursuit algorithm(to be described later) is used. When a moving object is determined, theAF motor 50 is driven by a drive amount corresponding to a sum of adefocus amount and a pursuit correction amount. At the same time, the AFdisplay mode is changed.

In the pursuit mode, the AF CPU 30 limits a single drive time of the AFmotor 50 upon full-depression of the release button signal (RB) to apredetermined period of time, and makes the release permission signal(RL) ON after the lapse of the predetermined period of time, thusadjusting a timing between the AF operation and the exposure.

In the pursuit mode (focus mode C and frame speed mode C2), the main CPU70 starts the exposure when the release permission signal (RL) is ON andthe release button signal (RB) is ON.

Table 2 summarizes the relationship between the combinations of theframe speed mode and the focus mode and the pursuit operation. FromTable 2, the pursuit mode for determining the drive amount of the AFmotor 50 for a moving object by adding a pursuit correction amount to anormal defocus amount is selected only when the focus mode C and theframe speed mode C2 are selected.

The operations of the AF CPU 30 and the main CPU 70 will be described indetail below with reference to FIGS. 3 and 4.

FIG. 3 shows the relationship between movements of an object and thephotographing lens and the operations of the AF CPU 30 and the main CPU70 when the release button is fully depressed in the pursuit mode. Alens position Z is plotted along the ordinate, and a time t is plottedalong the abscissa. A solid curve L1 is a path of an ideal position ofthe photographing lens 11 necessary for always forming an object imageon a film surface when an object is continuously moved.

An alternate long and short dashed curve L2 is an actual moving path ofthe photographing lens 11. At time t0 at which the main CPU ends themirror-down operation, the photographing lens stands still, and its lensposition is Z0. The AF CPU starts storage of the CCD from time t0, andends storage at time t7. The AF CPU starts A/D conversion of the CCDdata and AF calculation from time t7. In the pursuit mode, when anobject is determined as a moving object in the pursuit algorithm as willbe described later, the photographing lens is driven according to anamount as a sum of a stationary object defocus amount calculated by theAF calculation and a pursuit correction amount. In this case, a sum(pursuit defocus amount) of a defocus amount corresponding to adifference (ΔZ2=Z2-Z0) between the solid curve L1 and the alternate longand short dashed curve L2 at time t10, an intermediate point betweentimes t0 and t7, and a (previous) pursuit correction amount iscalculated at time t1.

The main CPU starts the charge and wind-up operations from time t0, andends them at time t2. When the charge and wind-up operations are endedat time t2, the AF CPU starts a motor drive operation to move thephotographing lens 11 by an amount (ΔZ1=Z1-Z0) as a sum of the previouspursuit defocus amount as a new pursuit correction amount and a presentdefocus amount. The main CPU starts the mirror-up operation from time t4a predetermined period of time after the motor drive start time t2. TheAF CPU forcibly ends the motor drive operation at time t5 apredetermined period of time after the motor drive start time t2.

The main CPU ends the mirror-up operation at time t8 a predeterminedperiod of time after time t4, and starts a shutter operation. At timet9, the main CPU ends the shutter operation, and starts a mirror-downoperation. At time t6, the main CPU ends the mirror-down operation.

The main CPU starts the charge and wind-up operations again from timet6, and the AF CPU starts a CCD storage operation for the next exposure.

As described above, in the pursuit mode, a time for AF and motor driveoperations is always set between adjacent exposures, and at the sametime, the timing of the shutter operation is set near the end timing ofthe motor drive operation. Therefore, as shown in FIG. 3, the exposurecan be performed at a timing at which a deviation between the paths L1and L2 is small, thus forming a just-in-focus photograph.

For the sake of descriptive convenience, a drive operation by anecessary pursuit defocus amount ΔZ1 is completed just between apredetermined AF motor drive time interval (t2 to t5). In practice, thedrive operation need only be ended at time t5' or t5" before completionof the motor drive time interval (t2 to t5) defined as a given value,and during a remaining time interval, the AF motor is stopped, thusfacilitating control.

In any case, a drive operation by the necessary defocus amount ΔZ1 mustbe ended within the predetermined motor drive time interval (t2 to t5).

The AF motor drive time interval is determined to be an interval inwhich a drive operation by the defocus amount of 3 to 4 mm can becompleted, e.g., about 100 ms.

In this manner, the constant AF motor drive time interval is set, andthe mirror-up operation is started at time t4 a predetermined period oftime after the motor drive start time t2, thus allowing the accuratepursuit exposure.

More specifically, since a cycle time (t0 to t6) can be renderedconstant regardless of the drive amount, the defocus amount obtained bythe AF calculation can be repetitively calculated in a period of thiscycle time. Therefore, discrimination of the presence/absence of amoving object (to be described later), calculation of the pursuitcorrection amount, and the like can be easily and accurately performed.A time interval is set such that the mirror-up operation is performed attime t4 a predetermined period of time after motor drive start time t2,the shutter operation is started upon completion of the mirror-upoperation, and a drive operation by a necessary drive amount iscompleted until time t8 at which exposure starts. Therefore, a timeinterval from the beginning of the motor drive operation to exposure (t2to t8) can be rendered constant, and an accurate predicted driveoperation can be performed so that the curves L1 and L2 cross at aninstance of exposure.

When an object is moving and its speed varies, if the time intervalbetween time t2 and time t8 is not constant, a change in lens driveamount corresponding to the movement of the object during a timeinterval corresponding to the variation must be calculated and correctedby any means, and it is very difficult to control so that the curves L1and L2 cross or coincide with each other at an instant of exposure.

Therefore, it is important to determine a constant AF motor drive time,and to start the mirror-up operation a predetermined period of timeafter the beginning of the motor drive operation in terms of improvementof the pursuit operation.

FIG. 4 is an operation flow chart showing the operation in the pursuitmode of the AF CPU in view of the relationship between internal flagsand I/O signals.

A delay flag (DLYFLG) is a flag representing a motor delay drive stateafter the mirror-up operation. The delay flag indicates that the motoris in a motor delay drive state when it is ON, and indicates that themotor is not in the delay drive state when it is OFF.

A drive state flag (MOVFLG) is a flag representing a motor drive state.This flag indicates that the motor is being driven when it is ON, andindicates that the motor is inactive when it is OFF.

A pursuit delay flag (PDYFLG) is a flag representing a motor pursuitdelay drive state from the beginning of the motor drive operation untilthe mirror-up operation is started in the pursuit mode. This flagindicates that the motor is in a pursuit delay drive state when it isON, and indicates that the motor is not in the pursuit delay drive statewhen it is OFF.

A mirror flag (MIRFLG) is a flag representing a pre- or post-mirror upstate in the pursuit mode. This flag indicates the pre-mirror up statewhen it is ON, and indicates the post-mirror up state when it is OFF.

In FIG. 4, the frame speed mode C2 and the focus mode C are selected,that is, the pursuit mode is selected, and the release button signal(RB) indicates a full-depression state (ON).

The AF CPU ends (OFF) the CCD storage and AF calculation at time t1, andwaits for AF permission from the main CPU.

At time t2, the main CPU completes the wind-up and charge operation, andsets the AF permission signal to be ON (permission). The AF CPU detectsthe ON AF permission signal, and starts the motor drive operation on thebasis of the AF calculation result. At the same time, the AF CPU setsthe drive state flag (MOVFLG) to be ON (motor drive state), the pursuitdelay flag (PDYFLG) to be ON (pursuit delay state), and the mirror flag(MIRFLG) to be ON (pre-mirror up state).

The AF CPU starts counting of a pursuit delay time interval (T1) fromtime t2, and ends counting at time t3. The AF CPU resets the pursuitdelay flag (PDYFLG) to be OFF (not pursuit delay state), and sets therelease permission signal (RL) to be ON (permission) with respect to themain CPU. When the pursuit delay time interval (T1) is set, apredetermined AF motor drive time interval can be assured until themirror-up operation is started.

The main CPU detects the ON release permission signal (RL), and startsmirror-up operation from time t4 and at the same time, sets themirror-up signal to be ON (up).

The AF CPU detects the ON mirror-up signal (MR), and sets the releasepermission signal (RL) to be OFF (inhibition). At the same time, the AFCPU resets the mirror flag (MIRFLG) to be OFF (post-mirror up state),and sets the delay flag (DFYFLG) to be ON (delay state).

The AF CPU counts a delay time interval (T2) from time t4. When the AFCPU completes counting at time t5, it resets the delay flag (DLYFLG) tobe OFF (not delay state). When the motor drive operation is notcompleted before time t5, the AF CPU forcibly ends the motor driveoperation, and resets the drive state flag (MOVFLG) to be OFF (stopstate).

The AF CPU waits until the mirror-up signal (MR) is set to be OFF(down).

When the main CPU completes a series of the mirror-up operation, theshutter operation, and the mirror-down operation starting from time t4,it sets the mirror-up signal (MR) to be OFF (down) at time t6. The AFCPU detects this signal, and starts the next CCD storage operation.

As described above, in the pursuit mode, the AF and AF motor driveoperations are performed once each between adjacent exposures, and amaximum of the AF motor drive time interval corresponding to a pursuitdelay time interval (T1) and a drive delay time interval (T2) can beassured. Therefore, the pursuit operation can be satisfactorilyperformed with respect to an object which moves fast.

The operation of the AF CPU in the pursuit mode along with the lapse oftime has been briefly described.

The detailed programs of the AF CPU and the main CPU and theiroperations in this embodiment will be described below.

The program of the main CPU will now be described with reference to theflow charts of FIGS. 5 and 6.

The main CPU incorporates a timer, and has a timer interruptionfunction. A program is constituted by a main program shown in FIG. 5,and a timer interruption program shown in FIG. 6.

In FIG. 5, in step #100 of the main program, initialization isperformed. More specifically, the I/O signals to the AF CPU, i.e., themirror-up signal (MR) is set to be OFF (down), and the AF permissionsignal is set to be ON (permission).

The timer is set to perform timer interruption every predetermined timeinterval, e.g., 50 ms, and timer interruption is permitted.

In step #105, it is waited until the release button signal (RB) is setto be ON (full-depression).

If YES (Y) in step #105, the flow advances to step #110 to test if thefocus mode (FM) is the manual mode (M). If YES in step #110, the flowjumps to exposure processing in step #130 and subsequent steps withoutwaiting for release permission in steps #115 to #125. If NO (N) in step#110, it is tested in step #115 if the focus mode (FM) is the continuousAF mode (C). If NO in step #115, i.e., if the one-shot AF mode is set,the flow advances to step #125. If YES in step #115, it is tested instep #120 if the frame speed mode is the continuous photographing mode(C2). If NO in step #120, the flow jumps to step #130. If YES in step#120, the flow advances to step #125.

In step #125, it is waited until the release permission signal (RL)becomes ON (permission). If YES in step #125, the flow advances to step#130.

In steps #110 to #125 described above, only when the focus mode is theone-shot AF mode or when the focus mode is the continuous AF mode andthe frame speed mode is the mode C2, i.e., the pursuit mode is selected,the release permission signal from the AF CPU is waited, and then, theflow advances to exposure processing in step #130 and subsequent steps.When other modes are selected, the exposure processing in step #130 andsubsequent steps is executed.

In step #130, the mirror-up signal (MR) is set to be ON (up). In step#135, aperture control is performed on the basis of the AE calculationresult performed in timer interruption processing (to be describedlater) so as to obtain a target aperture value, and at the same time,mirror-up control is performed. In step #140, shutter control isperformed on the basis of a shutter speed calculated by an AEcalculation. In step #145, mirror-down control is performed, andaperture control is performed to set a full aperture. In step #150, themirror-up signal (MR) is set to be OFF (down). In step #155, the AFpermission signal (AF) is set to be OFF (inhibition). In step #160,wind-up and charge control operations are performed. When the wind-upand charge control operations are completed, the AF permission signal(AF) is set to be ON (permission).

It is tested in step #170 if the frame speed mode is the normalcontinuous photographing mode (C2). If YES in step #170, the flowadvances to step #175, and after a predetermined delay time, the flowreturns to step #105.

If NO in step #170, it is tested in step #180 if the frame speed mode isthe single mode (S). If YES in step #180, it is waited until the releasebutton signal (RB) does not indicate a full-depression state (OFF) instep #185. If NO in step #185, the flow returns to step #105.

If NO in step #180, i.e., if the high-speed continuous photographingmode (C1) is set, the flow immediately returns to step #105, and thenext exposure sequence is repeated.

FIG. 6 shows a timer interruption program of the main CPU. Duringexecution of the main program by the main CPU, the timer interruptionprogram is started every predetermined period of time (e.g., 50 ms).

When timer interruption is performed, the main CPU communicates with thelens CPU 13 shown in FIG. 1 through the communication bus 64 in step#200, and fetches AE information of the lens (set aperture value, focallength, and the like).

In step #205, the main CPU acquires AE information of the body(photometric value, film sensitivity, and the like) from the AEinformation means 85 shown in FIG. 1.

In step #210, an AE calculation is performed on the basis of the lens AEinformation and the body AE information to determine a target aperturevalue and shutter speed.

In step #215, the results obtained by the AE calculation are displayedon the display means 86 shown in FIG. 1, and the flow returns to themain program in step #220.

The program operation of the main CPU has been described.

A program of the AF CPU will be described below.

The AF CPU incorporates a memory for storing A/D conversion data of theCCD outputs, the timer, and the pulse counter, and has a timerinterruption function and a pulse counter interruption function.

Table 3 summarizes names and meanings of flags used in the program ofthe AF CPU.

Table 4 summarizes names and contents of data used in the program of theAF CPU..

The program of the AF CPU is constituted by a main program and twointerruption programs (a timer interruption program and a pulse counterinterruption program) shown in FIGS. 26A, 26B, and 27.

The main program consists of modules 1 to ○ 11 , as shown in FIG. 7, andhas a large loop architecture.

In an initialization module 1 of the main program, various flags, data,and signals are initialized.

In a storage preparation module 2, it is checked if the CCD storageoperation can be started. When the storage operation can be permitted(the mirror is down and the AF motor stands still), start and end timesof the storage operation, and management of a storage time arecontrolled in a CCD storage control module 3.

In a CCD output A/D conversion module 4, CCD data obtained byA/D-converting CCD outputs are stored in the internal memory.

In an AF algorithm module 5, the stored data undergo a predetermined AFcalculation to calculate a defocus amount of a stationary object.

In a lens information read module 6, the AF CPU communicates with thelens CPU to read lens AF information necessary for the motor driveoperation and the like.

In a pursuit algorithm module 7, it is checked if an object is a movingobject. If an object is determined as a moving object, a pursuitcorrection amount is added to the defocus amount for the stationaryobject to determine a motor drive amount (pursuit drive amount) for themoving object.

In an in-focus discrimination/display module 8, it is checked if anin-focus state is set (whether or not the defocus amount falls within anin-focus zone). The discrimination result is displayed on the AF displaymeans 40 shown in FIG. 1.

In an AF permission wait module 9, it is waited until the AF permissionsignal (AF) becomes ON (permission) in the pursuit mode.

In a drive control module ○ 10 , the defocus amount is converted to apulse count, the pulse count data is set in the comparison register, andthe AF motor begins to drive in an in-focus direction.

In an AGC (auto-gain control) calculation module ○ 11 , a next CCDstorage time (INTT) is determined on the basis of the presently obtainedCCD data so that next CCD data can have appropriate values. The flowreturns to the storage preparation module 2.

The main program of the AF CPU has been briefly described above. The CCDstorage operation and the photographing lens drive operation by the AFmotor drive operation are time-serially independent sequences.

In a timer interruption module ○ 12 , detection processing of changes invarious I/O signals, set/reset processing of flags according to thedetected changes, management of a drive delay time interval, anddetection of a lens end are performed.

In a pulse counter interruption module ○ 13 , AF motor drive stopprocessing is performed.

The operations of the above modules will be described in detail below.

FIG. 8 is a flow chart of the initialization module 1. The AF CPU startsprocessing from step #230 upon power-ON or resetting. In step #230,various flags and data used in the program of the AF CPU areinitialized. Initial values of the flags and data are as shown in Tables3 and 4. In Table 4, data having a blank column of the initial valuedoes not require initialization.

The initial value of the CCD storage time (INTT) is set to be apredetermined value IZ (e.g., 1 ms).

In step #235, the release permission signal (RL) is set to be OFF(inhibition). This is to inhibit the exposure even if the release buttonis immediately fully depressed upon power-ON in the one-shot AF mode orthe pursuit mode.

In step #240, the indicators 41, 42, 43, and 44 of the AF display means40 shown in FIG. 1 are turned off. In step #245, the AF motor isinitialized (stopped).

In step #250, an instruction for discharging the transfer portions ofthe light-receiving portions of the CCD and setting the CCD in a storageend state is supplied to the sensor control means 26 shown in FIG. 1,thus initializing the CCD. In step #255, the timer and the likeincorporated in the AF CPU are set, so that timer interruption isperformed every predetermined period of time (e.g., 1 ms).

In step #260, the timer interruption is permitted.

In step #265, pulse counter interruption for stopping the AF motor driveoperation is inhibited, and the flow advances to the storage preparationmodule 2.

Since the program has the loop architecture as described above, adescription of the storage preparation module 2 and following moduleswill be made not as an operation upon power-ON but as an operation afterthe loop is circulated several times.

FIG. 9 shows a flow chart of the storage preparation module 2.

It is tested in step #270 if the pursuit mode is set. If NO in step#270, the flow jumps to step #276. If YES in step #270, it is tested instep #275 if the mirror-up operation is completed. If NO in step #275,the flow returns to step #270, and..the above processing is repeated. IfYES is obtained in step #275, the flow advances to step #276.

The processing operations in steps #270 and #275 are those forperforming the AF calculation and the AF motor drive operation oncebetween adjacent exposures when the pursuit mode is selected and therelease button is fully depressed, as shown in the operation timingchart of FIG. 4.

While the release button is fully depressed in the pursuit mode, themirror flag (MIRFLG) is set to be 0N at the beginning of the AF motordrive operation, as will be described later, and the next CCD storageoperation is started after the mirror flag (MIRFLG) is set to be OFFupon completion of the mirror-up operation.

In a mode other than the pursuit mode, since the AF calculation and theAF motor drive operation are repetitively performed so far as timepermits, the flow skips step #275. In the pursuit mode, the AFcalculation is performed only once between adjacent exposures for thefollowing reason.

More specifically, in the pursuit operation in the continuousphotographing mode, the pursuit correction amount is calculated so thata just-in-focus state is obtained at an instant of exposure, and thelens is drive-controlled to attain this, as has been described above.

In order to achieve the above object with high accuracy, exposure,storage calculation, drive operation, exposure, storage calculation,drive operation, . . . are preferably repeated at predetermined timeintervals. When the number of times of the storage calculation performedbetween exposure and the drive operation varies every cycle, a cycletime is varied, and it is very cumbersome or difficult to accuratelydiscriminate a moving object and to calculate an accurate pursuitcorrection amount.

It is tested in step #276 if the AF motor is in a scan state (SCAFLG isON). If YES in step #276, the flow jumps to step #285 without waitinguntil the AF motor drive operation is stopped in step #280. In only thescan state, the AF motor scan drive operation and the CCD storageoperation are allowed to be simultaneously performed.

If NO in step #276, the flow advances to step #280.

In step #280, it is waited until the AF motor drive operation is stopped(MOVFLG is OFF). If NO in step #280, the flow advances to step #285.This processing is performed to time-serially separate the CCD storageoperation and the AF motor drive operation, as described above. In step#285, it is tested if the pursuit state is set. If NO in step #285, theflow jumps to step #305. In the pursuit state (PRESFLG is ON), it isdiscriminated in a pursuit algorithm (to be described later) that anobject is a moving object, and the AF motor is driven by a drive amountgiven by (normal drive amount+pursuit correction amount). If YES in step#285, it is tested in step #290 if the object is coming closer (pursuitdrive amount DRIV<0, i.e., the drive direction is a closest focusingdirection). If YES in step #290, the flow jumps to step #305.

If NO in step #290, i.e., if the object is going away, it is tested instep #295 if the remaining drive amount (estimated pulse countETM-present pulse count ECNT) is larger than a predetermined amount EX.If NO in step #295, the flow jumps to step #305.

If YES in step #295,.the flow advances to step #300, and the pursuitcorrection amount is cleared (COMP=0).

Note that the pursuit correction amount is data used in the pursuitalgorithm (to be described later).

To summarize the processing in steps #285 to #300, when the pursuit modeis set, the object is going away, and the-remaining drive amount whenthe AF motor is stopped is large, the pursuit correction amount iscleared.

The reason for this will be described below with reference to FIG. 10.

In FIG. 10, a solid curve represents a path of an ideal lens position ofthe photographing lens 11 for always forming an object image on a filmsurface when an object is going away at a constant speed, and analternate long and short dashed curve represents a path of movement ofthe photographing lens when the release button is fully depressed in theactual pursuit mode.

A case will be examined below. In this case, at time t0, thephotographing lens 11 is stopped at a position Z0, and a CCD storageoperation is started. At time t1, an intermediate point of the storagetime, the solid curve and the alternate long and short dashed curvecross almost perpendicular to each other, and a defocus amount for astationary object becomes almost zero. With the pursuit algorithm, themoving object is discriminated, and a drive operation is started fromtime t2 by a pursuit drive amount (Z2-Z0) added with the pursuitcorrection amount. When the release button is fully depressed in thepursuit mode, the entire drive time interval of the AF motor is limitedto a predetermined period of time (almost T1+T2), as has been describedwith reference to the operation timing chart in FIG. 4. Therefore, whenthe pursuit drive amount is large and the photographing lens does notreach a predetermined lens position Z2 until time t2 the predeterminedperiod of time after t2, the drive operation of the AF motor is forciblystopped at the lens position Z1 at time t3. The CCD storage operation isrestarted from time t3. If the solid curve position corresponds to Z3 attime t4, an intermediate point in the storage time, the defocus amountfor a stationary object corresponds to (Z3-Z1). On the other hand, ifthe object is discriminated as a moving object in the pursuit algorithmagain, the pursuit drive amount added with the pursuit correction amountis almost the same as the previous one is (Z4-Z3). When the driveoperation is started from time t5 with this drive amount, the lensconsiderably overruns, as indicated by a broken curve.

If it is discriminated at time t5 that the object is not a movingobject, the lens is driven from time t5 by a drive amount (Z3-Z1)corresponding to the defocus amount for a stationary object, and reachesa lens position Z3 at time t6, thus being prevented from overrunningfrom the solid curve.

In the processing in steps #285 to #300 in FIG. 9, when the remainingdrive amount becomes large in the pursuit mode (e.g., when the AF motoris-forcibly stopped at time t3 in FIG. 10), the pursuit correctionamount is cleared. In the pursuit algorithm (to be described later),when the pursuit correction amount is cleared in the pursuit mode, theobject is not discriminated as a moving object in that cycle. Therefore,the pursuit mode is reset after time t5, and the photographing lens canbe moved along a path indicated by the alternate long and short dashedcurve.

In step #290 in FIG. 9, the moving direction of the object is tested,and when the object is coming closer, the pursuit correction amount isnot cleared for the following reason. Since the ideal movement of thelens becomes large as the object is coming closer, the problem ofoverrunning of the photographing lens rarely occurs.

On the other hand, when the object is going away, the ideal movement ofthe lens becomes small as the object is going away, and the problem ofoverrunning is posed.

Of course, when the object is coming closer, the same processing as inthe case wherein the object is going away can be performed.

The predetermined amount EX in step #295 can be experimentallydetermined to be a given amount, and can be varied depending on variousconditions (lens focal length, AF cycle time=AF time+drive time, and thelike).

Referring back to FIG. 9, the storage preparation module 2 will bedescribed below again.

In step #305, it is waited until the mirror-up signal (MR) from the mainCPU is set to be OFF (down) to prepare for the CCD storage controlmodule 3. If YES in step #305, the flow advances to the CCD storagecontrol module 3.

FIG. 11 is a flow chart of the CCD storage control module 3.

Before the flow advances to step #320, whether or not the motor driveoperation is stopped is confirmed, and whether or not the mirror-upsignal is set to be OFF (down) and the CCD storage operation is enabledis confirmed in a state other than the motor scan state.

In step #320, the CCD storage start instruction is issued to the sensorcontrol means 26 in FIG. 1 to start the CCD storage operation.

In step #325, the storage time (INTT) determined by the AGC calculationmodule ○ 11 (to be described later) is counted except for the CCDstorage operation for the first time.

When the CCD storage operation is performed for the first time, thestorage time (INTT=IZ) initially set in the initialization module 1 iscounted.

The storage time is counted by a timer incorporated in the AF CPU or asoftware timer.

When the storage time is counted in step #325, the CCD storage endinstruction is issued to the sensor control means 26 to end the CCDstorage operation, and the flow advances to the CCD output A/Dconversion module 4.

FIG. 12 is a flow chart of the CCD output A/D conversion module 4. Instep #340, the AF CPU starts A/D conversion of the CCD outputs sent fromthe CCD 25 in synchronism with the CCD output sync signal supplied fromthe sensor control means 26.

In step #345, the CCD outputs are A/D converted a predetermined numberof times (2 n times) in synchronism with a CCD output transfer clocksent from the sensor control means 26, and CCD data are stored in theinternal memory. Pairs of CCD data are A (1) to A (n) and B(1) to B(n),and data A(1) and B(1), data A(2) and B(2) , . . . , data A(n) and B(n)are output data of the corresponding light-receiving elements of thepair of light-receiving portions in FIG. 2. When storage of the CCD datais completed, the flow advances to the AF algorithm module 5.

FIG. 13 is a flow chart of the algorithm module 5. In step #360, a knowncorrelation calculation disclosed in Japanese Patent Laid-Open (Kokai)No. 60-37513 is performed using the 2 n CCD data A(1) to A(n) and B(1)to B(n) stored in the internal memory, thus obtaining a parameter (SLOP)indicating reliability of the calculated lateral shift amount and arelative lateral shift amount (SHIFT) between a pair of object images onthe CCD 25 in FIG. 2.

The known correlation calculation will be briefly described below withreference to FIGS. 14 and 15.

A correlation calculation of equation (1) is performed to obtain acorrelation amount C(L) between CCD data. ##EQU1## where L is aninteger, and is the relative shift amount while a light-receivingelement pitch of a pair of CCD data is used as a unit. The integralcalculation in equation (1) is executed within a range wherein the CCDdata are present.

FIG. 14 shows the calculation result of equation (1) while the relativeshift amount L is plotted along the abscissa, and the correlation amountC(L) is plotted along the ordinate. As shown in FIG. 14, the correlationamount C(L) becomes minimum at the shift amount L having highcorrelation between the pair of CCD data.

However, in practice, since the relative shift amount L is determined onthe basis of data discretely obtained from the light-receiving elementsconstituting the light-receiving portions 29A and 29B, the correlationamount C(L) also becomes discrete data. For this reason, a minimum valueC(L)_(MIN) of the correlation amount C(L) is not always obtained fromthe correlation amount C(L) obtained by the calculation.

The minimum value C(L)_(MIN) of the correlation amount C(L) iscalculated using a three-point interpolation technique shown in FIG. 15.

More specifically, when the minimum value of the discretely obtainedcorrelation amount C(L) is obtained when the relative shift amount L isL=x, the correlation amounts C(L) corresponding to the relative shiftamounts (x-1) and (x+1) are C(x-1), C(x), and C(x+1). First, a straightline H connecting the minimum correlation amount C(x) and a larger oneof the remaining two correlation amounts C(x-1) and C(x+1) (in FIG. 9,C(x+1)) is drawn, a straight line J passing through the remainingcorrelation amount C(x-1) and having an opposite gradient to that of thestraight line H is then drawn, and an intersection W between these twostraight lines H and J is obtained.

The coordinates of the intersection W can be represented by a relativeshift amount x_(m) and its correlation amount C(x_(m)), and the minimumrelative shift amount x_(m) of a continuous relative shift amount andthe minimum correlation amount C(x_(m)) can be represented by thecoordinates.

When the three-point interpolation technique is expressed by anequation, the minimum relative shift amount x_(m) is given by: ##EQU2##

The corresponding correlation amount C(x_(m)) can be given by: ##EQU3##

In equations (2-1) and (2-2), D is the deviation between data of therelative shift amounts . . . x-1, x, x+1, . . . , and can be expressedby: ##EQU4##

In equations (2-1) and (2-2), SLOP represents a larger one of deviationsof the correlation amounts C(x-1), C(x), and C(x+1) corresponding to therelative shift amounts (x-1) , x, and (x+1) , and can be expressed by:

    SLOP=MAX(C(x+1)-C(x), C(x-1)-C(x))                         (4)

In calculation formulas expressed by equations (1) to (4), if therelative shift amount x_(m) represents a relative shift amount of a pairof CCD data, and a light-receiving element pitch is represented by y,the relative lateral shift amount SHIFT of two object images formed onthe CCD 25 can be expressed by:

    SHIFT=y x x.sub.m                                          (5)

A defocus amount on a focal plane can be given by:

    DEF=KX x SHIFT                                             (6)

KX is the coefficient determined by conditions of the arrangement of theAF optical system shown in FIG. 2.

As the value of the parameter SLOP obtained by equation (4) is larger, alower peak value of the correlation amount C(L) shown in FIG. 14 issmaller, i.e, the correlation is high, and hence, reliability of theobtained defocus amount DEF is high.

A description will be continued referring again to FIG. 13.

In step #360, the shift amount (SHIFT) and the reliability (SLOP) arecalculated.

In step #365, it is tested if the shift amount (SHIFT) is calculated.

More specifically, in FIG. 14, if no lower peak is found after shiftamount L is shifted to a maximum shift amount (5 in FIG. 14), the shiftamount (SHIFT) cannot be obtained. If NO in step #365, the flow advancesto step #385. If YES in step #365, it is tested in step #370 if thecalculated defocus amount (DEF) has reliability (SLOP is equal to orlarger than a predetermined value SX). If NO in step #370, the flowadvances to step #385.

If YES in step #370, a low-constant flag (LOCFLG) is reset (OFF) in step#375 to indicate that the AF operation can be performed. In step #380,the defocus amount (DEF) is calculated from the shift amount (SHIFT) inaccordance with equation (6). The flow then advances to the lensinformation read module 6. If NO in step #365 or #370, the low-contrastflag (LOCFLG) is set (ON) to indicate that the AF operation cannot beperformed. The flow then advances to the lens information read module 6.

FIG. 16 is a flow chart of the lens information read module 6. In step#390, the AF CPU communicates with the lens CPU 13 through thecommunication bus 64 in FIG. 1, and reads lens AF information necessaryfor the AF CPU and stored the read data in the internal memory.

For example, data such as a pulse conversion coefficient KL necessaryfor converting the defocus amount (DEF) into a pulse count, a lens focallength FL, information indicating whether or not the lens is an AFcapable lens, and the like are sent from the CPU 13 to the AF CPU. Instep #395, it is tested on the basis of the read lens information if themounted lens is an AF lens (AF capable lens). If YES in step #395, an AFlens flag (AFLFLG) is set (ON), and the flow advances to the pursuitalgorithm module 7.

If NO in step #395, the AF lens flag (AFLFLG) is reset (OFF), and theflow advances to the pursuit algorithm module 7.

FIGS. 17A and 17B are flow charts of the pursuit algorithm module 7.

In steps #410 to #425, the number of shots during full-depression of therelease button is counted. In step #410, it is tested if the releasebutton signal (RB) is ON (full-depression). If NO in step #410, a shotcounter (PCOUNT) is cleared to 0, and the flow advances to step #430.

If YES in step #410, it is tested in step #415 if a shot count issmaller than 3 (PCOUNT<3). If NO in step #415, i.e., if the shot countis equal to or larger than 3, the shot count is left unchanged, and theflow advances to step #430.

If YES in step #415, the shot count is incremented by one(PCOUNT=PCOUNT+1).

Data of the shot counter (PCOUNT) is used in pursuit discrimination (tobe described later) in the pursuit mode. While the release button isfully depressed in the pursuit mode, the CCD storage operation and theAF operation are performed once between adjacent exposures, and hence,the pursuit algorithm module 7 is executed once. Therefore, the numberof shots is counted in steps #410 to #425. In steps #430 to #515,whether or not a pursuit operation is performed in the pursuit mode isdiscriminated.

Table 5 summarizes conditions for performing the pursuit operation. Instep #430, it is tested if the pursuit mode is presently set (PMDFLG isON). The pursuit mode flag (PMDFLG) is updated by periodically checkingthe combination of the focus mode and the frame speed mode in the timerinterruption processing (to be described later).

If NO in step #430, the flow advances to step #545 without performingthe pursuit operation. If YES in step #430, it is tested in step #435 ifthe AF operation cannot be performed (LOCFLG is ON).

If YES in step #435, the flow advances to step #545 without executingthe pursuit operation.

If NO in step #435, the flow advances to step #440, and it is tested ifthe calculated defocus amount (DEF) has reliability, i.e., the parameterSLOP representing reliability calculated using equation (4) is equal toor larger than the predetermined value SZ.

Of course, the predetermined value SZ has a larger value than thepredetermined value SX used in step #365.

If NO in step #440, the flow advances to step #545 without executing thepursuit operation. Such discrimination is made due to the followingreason. When the reliability is low, the defocus amount includes manyerror components. If the pursuit operation (to be described later) isperformed in this state, the photographing lens causes an unstableoperation (e.g., hunting) even for a stationary object. Thus, the abovediscrimination is made to prevent such an unstable operation.

In step #440, the reliability is discriminated on the basis of the valueof the parameter SLOP calculated by equation (4). However, the presentinvention is not limited to this, and any processing may be made as longas reliability can be discriminated. For example, contrast informationCONT calculated using equation (7) is compared with a predeterminedvalue to discriminate reliability. ##EQU5## where A(i) is CCD data, and#is a predetermined integer.

If it is determined in step #440 that reliability is found, the flowadvances to step #445 to test if the motor scan state is set (SCAFLG isON). If YES in step #445, the flow advances to step #545 withoutperforming the pursuit operation.

The defocus amount is obtained in the scan state on the basis of CCDdata which are stored while the photographing lens is driven, andincludes many error components. If the pursuit operation is performed onthe basis of this defocus amount, an unstable operation tends to occur.

Step #445 is determined to prevent such a drawback.

If NO in step #445, the flow advances to step #450 to test if animmediately preceding drive operation is performed (DRVFLG is ON). If NOin step #450, the flow jumps to step #545 without performing the pursuitoperation. The pursuit operation is an operation for correcting thedefocus amount by adding a pursuit correction amount thereto under theassumption that the photographing lens is moved, as will be describedlater. Therefore, when the pursuit operation is performed from a statewherein the photographing lens stands still, pursuit correction cannotsatisfactorily function, resulting in an unstable operation.

Therefore, a normal drive operation (drive operation without pursuitcorrection) is always performed between the state wherein thephotographing lens stands still and the pursuit operation, thuspreventing the unstable operation.

If YES in step #450, the flow advances to step #455 to test if the theimmediately preceding drive operation is a first drive operation afterthe drive direction is reversed (REVFLG is ON).

A drive reversal flag (REVFLG) is a flag which is set when the drivedirection is reversed in the drive control module ○ 10 (to be describedlater).

If YES in step #455, the flow jumps to step #545 without performing thepursuit operation.

The reason for branching in step #455 will be described below withreference to FIGS. 18A and 18B. FIG. 18A shows the movement of thephotographing lens when discrimination in step #455 is omitted. In FIG.18A, a solid curve indicates the position (in-focus position) of thephotographing lens for causing an object image of a stationary object tocoincide with the film surface, and an alternate long and two shortdashed curve indicates actual movement of the photographing lens. Whenthe photographing lens approaches an in-focus position from a defocusedposition by a drive operation D0 and overruns the in-focus position dueto an error, a defocus position calculated at this position is DEF0.From this position, the photographing lens is driven by a driveoperation D1 toward the in-focus position on the basis of the defocusamount DEF0. Since the drive operation D1 is a first drive operationafter the drive direction is reversed, the photographing lens is notmoved to the in-focus position due to backlash of the body and lenstransmission systems 51 and 12, as indicated by a broken curve, and isstopped at a position separated from the in-focus position by thebacklash. When a defocus amount calculated at this position is DEF1, thephotographing lens cannot reach the in-focus position although theimmediately preceding drive operation is performed. Thus, the pursuitoperation is started, and the drive amount of the next drive operationD2 is twice the defocus amount DEF1. As a result, the photographing lenspasses the in-focus position. Thereafter, the similar operation isrepeated, and hunting occurs around the in-focus position.

In FIG. 18B, in the second drive operation D2 after the drive directionis reversed, since no pursuit operation is performed, the drive amountcorresponds to the defocus amount DEF1, and the photographing lens canreach the in-focus position.

In the above description, when the drive direction of the photographinglens is reversed, the pursuit operation in the two drive operationsafter reversal is inhibited. However, the present invention is notlimited to the two drive operations. The pursuit operation need only beinhibited a predetermined number of times exceeding the two driveoperations.

When the photographing lens is moved by a predetermined amount or morein the first drive operation after reversal, the pursuit operation canbe permitted in the second drive operation. When an accumulated driveamount after reversal exceeds a predetermined value, the pursuitoperation may be permitted.

The pursuit operation may be inhibited for a predetermined period oftime after reversal.

As described above, the processing in step #455 is to prevent anunstable operation caused by a backlash when the drive direction isreversed. If NO in step #455, the flow advances to step #460 to test ifthe pursuit operation is being performed (PRESFLG is ON). A pursuitoperation flag is set (ON) when the pursuit operation is performed,i.e., a moving object is determined, and the photographing lens isdriven by the pursuit drive amount obtained by adding the pursuitcorrection amount to the defocus amount for a stationary object.

If NO in step #460, the pursuit correction amount (COMP) is cleared to 0in step #465, and the flow advances to step #480.

If YES in step #460, the flow advances to step #470 to test if thepresently obtained defocus amount (DEF) has the same sign as that of theimmediately preceding pursuit defocus amount (PLST). If YES in step#470, the flow advances to step #480; otherwise, the flow advances tostep #475 to test if the absolute value (|DEF|) of the defocus amount islarger than the predetermined value DX. If YES in step #475, the flowjumps to step #545 without performing the pursuit operation. If NO instep #475, the flow advances to step #480. The processing in steps #470to #475 is performed to shorten a response time at the end of thepursuit processing, and will be described in detail below with referenceto FIG. 19.

In FIG. 19, a solid curve is an ideal path of the photographing lensposition for causing an object image of an object to coincide with thefilm surface, and an alternate long and short dashed curve is a path ofactual movement of the photographing lens.

In the pursuit operation before the release button is depressed, pursuitcorrection is performed to drive the photographing lens so that thedefocus amount (DEF) as the AF result becomes 0 even for a movingobject, as will be described later. Therefore, the operation isperformed so that the solid curve intersects with the alternate long andshort dashed curve at an intermediate point in the CCD storage time.(FIG. 19 is illustrated under the assumption that the drive operation iscompleted, i.e., the storage operation is performed for a storage timeof almost 0.)

When an object is immediately stopped during the pursuit operation, thepresent defocus amount (DEF) has a sign opposite to that of theimmediately preceding pursuit defocus amount (PLST), and its absolutevalue becomes considerably large.

However, in this case, the present pursuit defocus amount (PRED) isobtained by adding the pursuit correction amount (COMP) to the presentdefocus amount (DEF), and has the same sign as and is almost equal tothe immediately preceding pursuit defocus amount (PLST). Indiscrimination processing in steps #480 to #515 (to be described later),it is not discriminated that the pursuit operation cannot be performed,and the pursuit operation is started. As indicated by a broken curve inFIG. 19, the photographing lens further overruns from the in-focusposition. In steps #470 and #475, the pursuit operation is disabled inthis case. As shown in FIG. 19, once the photographing lens overruns thein-focus position, the pursuit operation is not performed, and in thenext drive operation, the photographing lens can reach the in-focusposition.

In step #480, the present pursuit defocus amount (PRED) is calculated asa sum of the present defocus amount (DEF) and the immediately precedingpursuit correction amount (COMP).

In step #485, it is tested if the sign of the present defocus amount(PRED) is the same as that of the immediately preceding pursuit defocusamount (PLST). If NO in step #485, the flow jumps to step #545 withoutperforming the pursuit operation.

When the pursuit direction is reversed, the pursuit operation istemporarily disabled, and a normal 1 drive operation is performed, thuspreventing an unstable operation (hunting, overrunning,-and the like)when the movement of the object is reversed.

If YES in step #485, the flow advances to step #490 to test if theabsolute value (|PRED+PLST|) of the sum of the present pursuit defocusamount (PRED) and the immediately preceding pursuit defocus amount(PLST) is equal to or larger than a predetermined value δ (e.g., 200μm).

If NO in step #490, the flow jumps to step #545 without performing thepursuit operation.

Since the pursuit defocus amount becomes almost equal to an error amountincluded therein near the in-focus position, if the pursuit operation isperformed using this amount, an unstable operation (hunting,overrunning, and the like) is caused around the in-focus position. Theprocessing in step #490 aims at preventing the unstable operation. Thepredetermined value δ may be experimentally determined to be a givenvalue or may be varied according to various conditions (lens focallength, information indicating whether or not the pursuit operation isperformed, reliability of the defocus amount, and the like).

In particular, in order to guarantee stability, a hysteresis may beadvantageously provided such that a predetermined value δ1 is used inthe pursuit operation, and a predetermined value δ2 (>σ1) is used in anoperation other than the pursuit operation.

In place of step #490, whether or not the pursuit operation is permittedcan be discriminated on the basis of only the absolute value of thepresent pursuit defocus amount (PRED). However, as in step #490, the sumof the present pursuit defocus amount and the immediately precedingpursuit defocus amount (PLST) is calculated, so that the influence of anerror included in the pursuit defocus amount can be eliminated, and amore stable pursuit operation can be assured.

If it is determined in step #490 that the absolute value is equal to orlarger than the predetermined value δ, the flow advances to step #495.In the processing in steps #495 to #515, whether or not the pursuitoperation is permitted is discriminated in accordance with a ratio ofthe present pursuit defocus amount (PRED) to the immediately precedingpursuit defocus amount (PLST).

As described above, during the pursuit operation, the defocus amount(DEF) becomes almost 0, and the pursuit correction amount COMP becomessubstantially constant.

Therefore, the ratio of the present pursuit defocus amount (PRED) to theimmediately preceding pursuit defocus amount (PLST) is ideally about 1.

Pursuit correction is performed under the assumption that an object ismoved at substantially the constant speed. When the speed of the objectis immediately changed, if the pursuit operation is performed, anunstable operation (hunting, overrunning, and the like) tends to occur.

When the speed of the object is changed, the defocus amount is changedaccordingly. Therefore, the ratio of the present pursuit defocus amountto the immediately preceding defocus amount varies with respect to 1.

Thus, in the processing in steps #495 to #515, the pursuit operation isperformed only when the ratio falls in a predetermined range including1, thus preventing an unstable operation caused by an immediate changein object speed.

In steps #495 to #505, an upper limit (r) is changed in accordance withthe content of the shot counter (PCOUNT).

The reason for this will be described below with reference to FIG. 20.

In FIG. 20, a solid curve is a path of movement of the photographinglens necessary for causing an object image to coincide with the filmsurface for a moving object, and an alternate long and short dashedcurve is a path of actual movement of the photographing lens in thepursuit operation.

Before the release button is fully depressed, the AF CPU repetitivelyperforms the CCD storage operation, the AF calculation, and the AF motordrive operation. This period is almost constant, i.e., F0, and thecontent of the shot counter (PCOUNT) is 0.

After the release button is fully depressed, the content of the shotcounter (PCOUNT) becomes 1, and the exposure is performed after thedrive operation.

Before the exposure is performed, the CCD storage operation is performedafter the drive operation, while after the release button is fullydepressed, the CCD storage operation is performed after the exposure.Therefore, the defocus amount before full-depression is almost 0, and afirst defocus amount (DEF2) after full-depression becomes a large value.

In the processing of the pursuit algorithm module 7 performed after thefirst exposure, i.e., when the shot count is 2 (PCOUNT=2), the presentpursuit defocus amount (PRED) is larger than the immediately precedingpursuit defocus amount (PLST). Therefore, unless the upper limit of theratio. (r) must be increased, the pursuit operation is undesirablyinaccurate.

Therefore, only when the content of the shot counter is 2 (PCOUNT=2),the upper limit (r) of the ratio is set to be a value (RL, RL>RS) largerthan a normal value (RS).

The content of the processing in steps #495 to #505 has been described.In step #495, it is tested if the first exposure (release) is completed.If NO in step #495 (PCOUNT≠2), the flow advances to step #505, and theupper limit (r) of the ratio is set to be the predetermined value RS(e.g., 3). The flow then advances to step #510. If YES in step #495(PCOUNT=2), the flow advances to step #500, and the upper limit (r) ofthe ratio is set to be the predetermined value RL (e.g., 6). The flowthen advances to step #510. In step #510, it is tested if the absolutevalue (|PRED|) of the present pursuit defocus amount is equal to orsmaller than a value r times the absolute value (|PLST|) of theimmediately preceding pursuit defocus amount. If NO in step #510, it isdetermined that the pursuit operation cannot be performed, and the flowjumps to step #545 without performing the pursuit operation. If YES instep #510, the flow advances to step #515 to test if the absolute value(|PRED|) of the present pursuit defocus amount is equal to or largerthan a value obtained by multiplying the absolute value (|PLST|) of theimmediately preceding pursuit defocus amount with a predetermined valuek (e.g., 1/2).

If NO in step #515, it is determined that the pursuit operation cannotbe performed, and the flow jumps to step #545 without performing thepursuit operation.

If YES in step #515, it is determined that the pursuit operation can beperformed, and the flow advances to step #520.

The above description assumes that the comparison parameters δ, r, and kin the discrimination processing in steps #490, #510, and #515 arepredetermined values. However, a hysteresis of a predetermined width maybe provided to each parameter in accordance with whether or not thepursuit operation is performed.

The hysteresis is set so that the pursuit operation cannot be easilystopped during the pursuit operation, and the pursuit operation cannotbe easily started in an operation other than the pursuit operation.

For example, the value δ is set to be δ1 during the pursuit operation,and otherwise, is set to be δ2 (>δ1); the value r is set to be RL1 orRS1 during the pursuit operation, and otherwise, is set to be RL2 (<RL1)or RS2 (<RS1); and the value k is set to be k1 during the pursuitoperation and otherwise, is set to be k2 (>k1).

In this manner, when the hysteresis is provided, transition betweenadjacent pursuit operations can be stably performed.

In steps #520 to #540, calculation processing for the pursuit operationis performed. In step #520, a coefficient α used when the pursuitcorrection amount (COMP) is calculated by multiplying the coefficient αwith the present pursuit defocus amount (PRED) is determined.

The content of the processing in step #520 will be described below withreference to FIG. 20.

In FIG. 20, before the release button is fully depressed, in a periodconsisting of the CCD storage, the AF calculation, and the AF motordrive operation, since F0 is almost constant, the coefficient α isappropriately set to be almost 1.

After the release button is fully depressed, the period includes theexposure. Therefore, the period is prolonged to F1, F2, and F3 ascompared to the period F0 before full-depression.

Before the release button is fully depressed, the coefficient α isdetermined so that the solid curve intersects with the alternate longand short dashed curve at an intermediate point in the CCD storage time.After the release button is fully depressed, the coefficient α isdetermined so that the solid curve intersects with the alternate longand short dashed curve at an intermediate point in an exposure time uponan exposure. In FIG. 20, periods from the beginning of the CCD storageoperation to the intermediate point of the exposure are indicated byF1', F2', and F3'. The coefficient α is almost proportional to the ratioof an immediately preceding period to a period to the intermediate pointof present exposure. When the content of the shot counter is 0(PCOUNT=0), the coefficient α is preferably set to be F0/F0≈1; when itis 1 (PCOUNT=1), F1'/F0=1.5; when it is 2 (PCOUNT=2), F2'/F1=0.9 to 1;when it is 3 (PCOUNT=3), F3'/F2=0.8 to 1.

The coefficient α is preferably changed in accordance with the movingdirection of the object and the focal length of a lens.

The reason for this will be described below with reference to FIGS. 21Aand 21B.

In FIG. 21A, a solid curve represents a path of movement of thephotographing lens for causing an object image to always coincide withthe film surface when an object is coming closer from ∞ to a closestfocusing position, and an alternate long and short dashed curverepresents a path of movement of the photographing lens when an objectis going away from the closest focusing position toward ∞.

When the object is coming closer, the movement of the photographing lensbecomes larger as the object comes closer to the closest focusingposition. On the contrary, when the object is going away, the movementof the photographing lens becomes smaller as the object goes away toward∞.

Therefore, when the object is going away, the coefficient α fordetermining the pursuit correction amount is preferably set to besmaller than that used when the object is coming closer.

FIG. 21B shows paths of the photographing lens with respect to an objectwhich is coming closer. In FIG. 21B, a solid curve represents a path ofmovement of a photographing lens having a small focal length, and analternate long and short dashed curve represents a path of movement of aphotographing lens having a large focal length.

When the focal length is large, the movement of the photographing lensfrom the infinity ∞ to the closest focusing position is constant.Contrary to this, when the focal length is small, the inclination of thepath of movement of the photographing lens is abruptly increased as theobject comes closer to the closest focusing position.

Therefore, when a lens has a large focal length, the coefficient α ispreferably set to be smaller than that used for a lens having a smallfocal length.

For the above-mentioned reasons, in step #520, the coefficient α isdetermined with reference to a table in the internal memory, as shown inTable A below, in accordance with three parameters, i.e., the shot count(PCOUNT), information indicating whether or not the lens focal length(FL) is larger than the predetermined value (FX), and the movingdirection of the object (sign of the pursuit defocus amount).

                  TABLE A                                                         ______________________________________                                        FL < FX              FL > FX                                                          COMING     GOING    COMING    GOING                                   PCOUNT  CLOSER     AWAY     CLOSER    AWAY                                    ______________________________________                                        0       1.0        .85      .85       .85                                     1       1.0        .85      .85       .85                                     2       1.0        .7       .85       .7                                      3        .9        .6       .75       .6                                      ______________________________________                                    

In step #525, the coefficient α determined in step #520 is multipliedwith the present pursuit defocus amount (PRED) to calculate a pursuitcorrection amount (COMP).

The way in which acceleration varies as indicated by the solid curve inFIG. 21B depends on whether the object is near the infinity ∞ or theclosest focusing position even if the focal length of the lens is keptunchanged.

Therefore, in order to strictly process the coefficient α, the value αis preferably determined taking the focal length information of the lensinto consideration. For example, when an object comes closer, the valueα is preferably increased as the object is closer to the closestfocusing position to increase the correction amount.

A method of obtaining the value α using neither focal length informationof a lens nor distance information will be described below. For thispurpose, a value of PRED/PLST=β is calculated using PLST and PREDdescribed above. When the image surface is moved at a constant speed,β=1, when its speed is accelerated, β>1, and when its speed isdecelerated, β<1. Therefore, the value α can be determined using β. Inthis case, the value α is determined on the basis of the value β usingthe following table.

    __________________________________________________________________________    β                                                                          β > 1.2                                                                       1.2 ≧ β > 1.1                                                             1.1 ≧ β > 1.0                                                             1.0 ≧ β > 0.9                                                             0.9 ≧ β > 0.8                                                             0.8 ≧ β ≧                                                          β < 0.7                   α                                                                         1.1  1.0     0.9     0.8     0.7     0.6     0.5                            __________________________________________________________________________

Although the value α becomes slightly smaller than the value β, itdepends on a time interval between exposure and a storage time, and isgiven by: ##EQU6##

In step #530, the pursuit correction amount (COMP) calculated in step#525 is added to the present defocus amount (DEF) to determine thepresent pursuit drive amount (DRIV) in order to perform the pursuitoperation.

In step #535, the immediately preceding (final) pursuit defocus amount(PLST) is replaced with the present pursuit defocus amount (PRED) toprepare for the next pursuit processing/discrimination.

In step #540, the flag indicating that the pursuit operation is beingperformed is set (PRSFLG is ON), and the flow advances to the in-focusdiscrimination/display module 8.

The above processing operations are executed when the pursuit operationis performed.

Steps #545 and #550 are executed when it is determined that the pursuitoperation cannot be performed.

In step #545, the present defocus amount (DEF) is employed as theimmediately preceding (final) defocus amount (PLST) to prepare for thenext pursuit processing/discrimination.

In step #550, since the pursuit operation is not performed, the pursuitoperation flag is reset (PRSFLG is OFF), and the flow advances to thein-focus discrimination/display module 8.

FIG. 22 is a flow chart of the in-focus discrimination/display module 8.

In step #560, it is tested if the focus mode is the one-shot mode(ONEFLG is ON). If YES in step #560, the flow skips step #565, andadvances to step #570. If NO in step #560, i.e., if the focus mode isthe continuous AF mode or the manual mode, a fix flag is reset (FIXFLGis OFF) in step #565, so that the drive display is not fixed after anin-focus state is obtained.

It is checked in step #570 if the drive display is fixed (FIXFLG is ON).If YES in step #570, the subsequent processing is not executed, and theflow advances to the AF permission waiting module 9.

If YES in step #570, the flow advances to step #575 to test if the AFoperation can be performed (LOCFLG is ON). If YES in step #575, the flowadvances to step #610, and an out-of-focus state is discriminated(FZCFLG is OFF). In step #615, the indicator 44 (X) of the AF displaymeans 40 is activated to perform a display.

If NO in step #575, a scan inhibition flag is set (NSCFLG is ON) toinhibit the following scan operation. It is then tested in step #585 ifthe pursuit mode is set (PMDFLG is ON).

If YES in step #585, the flow advances to step #590 to test if thepursuit operation is being performed (PRSFLG is ON).

If YES in step #590, it is tested in step #595 if a lens end is reached(LLMFLG is ON). If YES in step #595, an out-of-focus state is determinedin step #600 to reset an in-focus flag (FZCFLG is ON) (so that a driveoperation can always be performed in the drive control module ○ 10 ). Instep #605, both the indicators 41 and 43 are activated to display thatthe pursuit operation is being performed in a display mode differentfrom other display states (in-focus and out-of-focus states). The flowthen advances to the next AF permission waiting module 9.

The processing in steps #620 to #640 is executed to determine anin-focus zone for AF discrimination. If NO in step #585, a narrow zone(ZONEN) used when the photographing lens enters the in-focus state fromthe out-of-focus state is set to be Z1 (e.g., 50 μm), and a wide zone(ZONEW) used when the photographing lens goes out of the in-focus stateto the out-of-focus state is set to be Z2 (e.g., 150 μm). The flow thenadvances to discrimination processing in step #645 and subsequent steps.

If NO in step #590 and if YES in step #595, the flow advances to step#625, and the narrow zone (ZONEN) is set to be Z3 (e.g., 50 μm), and thewide zone (ZONEW) is set to be Z4 (e.g., 100 μm). Since the zone Z4 isset to be smaller than the zone Z2, a response time of the driveoperation in the pursuit mode can be shortened.

It is tested in step #630 if a luminance is low (LOLFLG is ON). If YESin step #630, the flow advances to step #640. If NO in step #630, it istested in step #635 if reliability is high (SLOP is larger than apredetermined value SY). If YES in step #635, the flow jumps to step#645. In step #635, the reliability is discriminated using the parameterSLOP. However, the contrast parameter CONT calculated using equation (7)may be used.

If NO in step #635 and if YES in step #630, the wide zone (ZONEW) ischanged to be Z5 (e.g., 200 μm) larger than Z4, and the flow advances tostep #645.

The processing in steps #630 to #640 is made to set an in-focus zone tohave a primary importance based on safety rather than a response timewhen the luminance and reliability are low in the pursuit mode.

It is tested in step #645 if the in-focus state is obtained in theimmediately preceding exposure (FZCFLG is ON). If NO in step #645, theflow advances to step #650, and the absolute value (|DEF|) of thepresent defocus amount is compared with the narrow zone (ZONEN).

If YES in step #645, the absolute value (|DEF|) of the present defocusamount is compared with the wide zone (ZONEW).

If NO in step #650 or #680, the flow advances to step #685, and theout-of-focus state is determined (FZCFLG is OFF). In step #690, the signof the present defocus amount (DEF) is checked.

If the sign is positive (near-focus), the flow advances to step #695,and the triangular mark of the indicator 41 is activated to display anear-focus state. The flow then advances to the next module.

If the sign is negative (far-focus), the triangular mark of theindicator 43 is activated to display a far-focus state, and the flowthen advances to the next module.

If YES in step #650 or #680, the in-focus flag is set (FZCFLG is ON) instep #655. It is tested in step #660 if the focus mode is the one-shotmode (ONEFLG is ON). If NO in step #660, the flow jumps to step #675.

If YES in step #660, the fix flag is set (FIXFLG is ON) in step #665 tofix the following drive and display operations.

In step #670, the release permission signal (RL) is ON (permission) toinform in-focus release permission to the main CPU. The flow thenadvances to step #675.

In step #675, the in-focus mark of the indicator 42 is activated todisplay an in-focus state, and the flow advances to the next AFpermission waiting module 9.

FIG. 23 is a flow chart of the AF permission waiting module 9.

In step #710, it is tested if the pursuit mode is set (PMDFLG is ON). IfNO in step #710, no processing is made and the flow advances to the nextdrive control module ○ 10 . If YES in step #710, it is waited in step#715 until the AF permission signal (AF) is ON (permission). If NO instep #715, steps #710 and #715 are repeated.

If YES in step #715, the flow advances to step #720 to test if therelease operation is being performed (PCOUNT≠0). If YES in step #720,the mirror flag (MIRFLG) is set (ON) to set a pre-mirror up state, apursuit delay state from the beginning of the drive operation by thedrive control module ○ 10 until the release permission signal (RL) is ON(permission) is set (PDYFLG is ON), and at the same time, a pursuitdelay time (PRSDLY) is set to be T1 in step #725. The flow then advancesto step #730.

If NO in step #720, the flow advances to step #730 without executingstep #725. It is tested in step #730 if the pursuit operation is beingperformed (PRSFLG is ON). If YES in step #730, the present defocusamount (DEF) is replaced with the pursuit drive amount (DRIV) in step#735, so that the drive operation can be performed using the pursuitdrive amount in place of the defocus amount in the drive control module○ 10 . If NO in step #730, the flow directly advances to the drivecontrol module ○ 10 .

FIGS. 24A and 24B are flow charts of the drive control module ○ 10 . Instep #740, it is tested if the AF permission signal (AF) is ON(permission). If NO in step #740, the flow jumps to non-drive processingin steps #865 to #880. If YES in step #740, the flow advances to step#745 to test if the AF mode is set (AFMFLG is ON). An AF mode flag(AFMFLG) is set when a mounted lens is an AF compatible lens, and thefocus mode is not a manual mode. If NO in step #745, the flow jumps tothe non-drive processing in step #865 and subsequent steps. If YES instep #745, it is tested in step #750 if the drive operation is fixed(FIXFLG is ON).

If YES in step #750, the flow jumps to the non-drive processing in step#865 and subsequent steps. If NO in step #750, the flow advances to step#755 to test if an in-focus state is obtained (FZCFLG is ON).

If YES in step #755, the flow jumps to the non-drive processing in step#865 and subsequent steps. If NO in step #755, the flow advances to step#760 to test if the AF operation cannot be performed (LOCFLG is ON). IfYES in step #760, the flow jumps to scan drive processing in step #830and subsequent steps. If NO in step #760, the flow advances to driveprocessing in step #765 and subsequent steps.

In steps #765 to #775, reversal of the drive direction of thephotographing lens is discriminated. In step #765, the sign of thepresent defocus amount (DEF) is compared with a last defocus amount(DEFLST). If YES in step #765, a drive reversal flag is set (REVFLG isON) in step #770, and the flow advances to step #780. If NO in step#765, the drive reversal flag is reset (REVFLG is OFF) in step #775, andthe flow advances to step #780.

In step #780, the last defocus amount (DEFLST) is updated with thepresent defocus amount (DEF).

In step #785, the drive amount of the AF motor, i.e., an estimated pulsecount (ETM) fed back from the encoder 52 according to the presentdefocus amount (DEF) is calculated using the following equation.

    ETM=KL×KB×|DEF|              (8)

In equation (8), the coefficient KL represents a rotational speed of thelens coupling 14 per unit defocus amount of the image surface of thephotographing lens, and the coefficient KB represents the pulse countgenerated by the encoder 52 per revolution of the body coupling 53.

Therefore, according to equation (8), the pulse count to be generated bythe encoder 52 when the image surface of the photographing lens is movedby the present defocus amount (DEF) can be calculated.

The calculated estimated pulse count is set in the comparison registeras a set value of pulse counter interruption (to be described later).

In step #790, the scan flag is reset (SCAFLG is OFF), and in step #795,the present drive operation is performed (DRVFLG is ON). In step #800,the drive state flag is set (MOVFLG is ON).

In step #805, the pulse counter is cleared (ECNT=0) before the driveoperation is started.

In steps #810 to #820, the drive direction is determined in accordancewith the sign of the present defocus amount (DEF) to start the driveoperation. In step #810, the sign of the present defocus amount (DEF) ischecked. If the near-focus state is detected (the sign is positive), theAF motor is rotated in the forward direction in step #815.

If the far-focus state is detected (the sign is negative), the flowadvances to step #820, and the AF motor is reversed.

At the end of the drive processing, the pulse counter interruption ispermitted in step #825, and the flow then advances to the next AGCcalculation module ○ 11 .

If YES in step #760, the flow advances to step #830 to test if the scandrive operation is being inhibited (NSCFLG is ON).

If YES in step #830, the flow advances to the non-drive processing instep #865 and subsequent steps without executing the scan driveoperation.

If NO in step #830, it is tested in step #835 if the scan operation isbeing performed (SCAFLG is ON). If YES in step #835, the flow jumps tostep #860 without executing scan drive start processing. If NO in step#835, the scan drive start processing in steps #840 to #855 is executed.In step #840, the flag indicating the scan state is set (SCAFLG is ON),and in step #845, the present drive operation is performed (DRVFLG isON). In step #850, the flag indicating that the drive operation is beingperformed is set (MOVFLG is ON).

In step #855, the drive operation of the AF motor is started in thepredetermined direction to start the scan operation, and in step #856, alens end counter is cleared (LCOUNT=0). The flow then advances to step#860.

In step #860, the pulse counter interruption is inhibited, and the flowadvances to the AGC calculation module ○ 11 .

When the flow advances from step #740, #745, #750, #755, or #830 to step#865, the scan flag is reset (SCAFLG-is OFF), and the flag indicatingthe drive state is reset (MOVFLG is OFF) in step #875. At the end of thenon-drive processing, the AF motor is stopped in step #880, and the flowadvances to the next module.

FIG. 25 is a flow chart of the AGC calculation module ○ 11 .

In step #890, the next CCD storage time (INTT) is calculated usingequation (9).

    INTT=INTT×IX/MAX                                     (9)

In equation (9), INTT in the right-hand side is the present storagetime, IX is the target value of the maximum value of CCD data, and MAXis the maximum value of the present CCD data.

According to equation (9), the next storage time (INTT in the left-handside) is set so that the maximum value of the next CCD data is set to bethe target value IX.

In step #895, it is tested if the next storage time is larger than apredetermined value IY, i.e., a luminance is low. If YES in step #895,the flow advances to step #900, and the low luminance flag is set(LOLFLG is ON), and the flow returns to the storage preparation module2. If NO in step #895, the flow advances to step #905, and the lowluminance flag is reset (LOLFLG is OFF). The flow then returns to thestorage preparation module 2. In the above processing, whether or notthe luminance is low is determined on the basis of the CCD storage time.The AF CPU may communicate with the main CPU to acquire AE information(photometric information) stored in the main CPU, and can determine onthe basis of the acquired information whether or not the luminance islow.

IY is set to be a predetermined value. However, a predeterminedhysteresis may be provided. One cycle of the storage calculation and thedrive operation of the main program has been described. This processingis repetitively executed.

FIGS. 26A and 26B are flow charts of the timer interruption program. Thetimer interruption program is started every predetermined period of timeduring execution of the main program to execute correspondingprocessing.

Processing in steps #910 to #925 is performed to update the AF mode flag(AFMFLG).

In step #910, it is tested if a mounted lens is an AF lens (AFLFLG isON). If YES in step #910, the flow advances to step #915 to test if thefocus mode signal (FM) indicates the one-shot AF mode or the continuousAF mode (C or 0). If YES in step #915, the flow advances to step #920,and the AF mode flag (AFMFLG) is set (ON). The flow then advances tostep #930. If NO in step #910 or if NO in step #915, the flow advancesto step #925, and the AF mode flag (AFMFLG) is reset (OFF). The flowadvances to step #930.

Processing in steps #930 to #940 is performed to update the one-shotflag. In step #930, it is tested if the focus mode signal (FM) indicatesthe one-shot AF mode.

If YES in step #930, the one-shot flag is set (ONEFLG is ON), and the.flow advances to step #945.

If NO in step #930, the one-shot flag is reset (ONEFLG is OFF), and theflow advances to step #945.

In steps #945 to #1005, full-depression, pursuit delay, and mirror-upprocessing operations in the pursuit mode are executed.

In steps #945 to #965, it is checked whether or not the pursuit mode isset. In step #945, it is tested if the frame speed mode signal (DM)indicates the normal continuous photographing mode (C2). If NO in step#945, the flow advances to step #965.

If YES in step #945, the flow advances to step 950 to test if the AFmode is set (AFMFLG is ON).

If NO in step #950, a non-pursuit mode is determined, and the flowadvances to step #965.

If YES in step #950, the flow advances to step #955 to test if theone-shot mode is set (ONEFLG is ON).

If YES in step #955, the non-pursuit mode is determined, and the flowadvances to step #965.

If NO in step #955, the pursuit mode is determined, and the flowadvances to step #960.

When the focus mode is the continuous AF mode, the frame speed mode isthe mode C2, and the mounted lens is the AF lens, the flow advances tostep #960, and the pursuit mode is set (PMDFLG is ON). Thereafter, theprocessing in the pursuit mode is executed.

On the other hand, in another combination of the modes, the non-pursuitmode and the pursuit mode are reset (PMDFLG is OFF), and the flowadvances to mirror-up processing in step #1010 without executing theprocessing in the pursuit mode.

If the pursuit mode is set in step #960, it is tested in step #970 ifthe release button signal (RB) is ON (full-depression). If YES in step#970, the flow jumps to step #980 without going through thefull-depression processing in the pursuit mode in step #975.

If NO in step #970, the pursuit delay flag is reset (PDYFLG is OFF) instep #975, the mirror flag is reset (MIRFLG is OFF), and the releasepermission signal (RL) is OFF (inhibition) to reset the operation in thefull-depression state in the pursuit mode.

In steps #980 to #995, the pursuit delay time is counted in the pursuitmode, and the release operation is permitted after the lapse of thepursuit delay time.

It is tested in step #980 if the pursuit delay operation is beingperformed (PDYFLG is ON). If NO in step #980, the flow advances to step#1000 without executing processing in step #985 and subsequent steps. IfYES in step #980, the pursuit delay time is decremented by one(PRSDLY=PRSDLY-1) in step #985. For example, when the timer interruptionis made every 1 ms and the pursuit delay time is 45 ms, PRSDLY=45 is setin the AF permission waiting module 9, and is decremented by one everytimer interruption. Therefore, the pursuit delay time becomes 0 afterthe lapse of 45 ms.

In step #990, it is tested if the pursuit delay time is ended(PRSDLY=0). If NO in step #990, the flow jumps to step #1000.

If YES in step #990, delay end processing is performed, the pursuitdelay flag is reset (PDYFLG=OFF), and the release permission signal (RL)is set to be ON (permission). A release permission signal is supplied tothe main CPU, and the flow advances to step #1000.

In steps #1000 and #1005, mirror-up processing in the pursuit mode isexecuted. In step #1000, it is tested if the mirror-up signal (MR)indicates a mirror-up operation (ON). If NO in step #1000, the flowjumps to step #1010.

If YES in step #1000, the mirror flag is reset (MIRFLG is OFF) in step#1005 to allow the flow to advance to the processing after the mirror-upprocessing in the storage preparation module 2. In addition, in order toinhibit the subsequent release operation, the release permission signal(RL) is OFF (inhibition), and the flow advances to step #1010.

Steps #1010 to #1050 correspond to mirror-up processing blocks. In step#1010, it is tested if the mirror-up signal (MR) is ON (up). If NO instep #1010, the mirror-up flag is reset (RLSFLG is OFF) to set amirror-down state. The flow then jumps to step #1060. If YES in step#1010, the fix flag is reset (FIXFLG is OFF) and the release permissionsignal (RL) is OFF (inhibition) so that fixing of the display drive andrelease permission in the in-focus state of the one-shot mode arecanceled after the single exposure (mirror-up operation).

It is tested in step #1020 if the mirror-up operation is performedduring the immediately preceding timer interruption (RLSFLG is ON). IfYES in step #1020, the flow jumps to step #1060.

If NO in step #1020, since the mirror is started to move upward from themirror-down state between the immediately preceding and present timerinterruption periods, the drive delay operation is started insynchronism with this, as shown in FIG. 4.

In step #1025, the mirror-up flag is set (RLSFLG is ON) to set amirror-up state. It is tested in step #1030 if the drive operation isbeing performed (MOVFLG is ON). If NO in step #1030, since the drivedelay operation need not be performed, the flow jumps to step #1060. IfYES in step #1030, the delay flag is set (DLYFLG is ON) in step #1035 toenter the drive delay state. In step #1040, it is tested if the pursuitmode is set (PMDFLG is ON).

If YES in step #1040, the delay time is set to be the predeterminedvalue T2 (DLY=T2) so that the mirror-up operation by the main CPU iscompleted and exposure is started just upon completion of the driveoperation. The flow then advances to step #1060.

If NO in step #1040, the delay time is set to be the predetermined valueT0 (DLY=T0, T0<T2) so that the drive operation is completed beforecompletion of the mirror-up operation by the main CPU, and the flowadvances to step #1060.

In steps #1060 to #1070, motor stop processing when the AF permissionsignal is OFF is executed.

In step #1060, it is tested if the AF permission signal (AF) is ON(permission). If YES in step #1060, the flow jumps to step #1075 withoutexecuting the stop processing.

If NO in step #1060, it is tested in step #1065 if the AF motor is beingdriven. If NO in step #1065, the flow jumps to step #1075 withoutexecuting the stop processing.

If YES in step #1060, the drive operation of the AF motor is stopped,and the drive state flag is reset (MOVFLG is OFF) in step #1070. Theflow then advances to step #1075. Steps #1075 to #1090 correspond toblocks of drive delay time counting and delay end processing operations.

In step #1075, it is tested if the drive delay operation is beingperformed (DLYFLG is ON). If NO in step #1075, the flow jumps to step#1095. If YES in step #1075, the drive delay time is decremented by one(DLY=DLY-1) in step #1080. When the timer interruption is performedevery 1 ms and the delay time is 55 ms, DLY=55 is set in step #1045, andis decremented by one every timer interruption. Therefore, the delaytime becomes 0 after the lapse of 55 ms. In step #1085, it is tested ifthe drive delay operation is ended (DLY=0). If NO in step #1085, theflow jumps to step #1095. If YES in step #1085, the drive operation ofthe AF motor is stopped, the drive delay flag is reset (DLYFLG is OFF),and the drive state flag is reset (MOVFLG is OFF) in step #1090. Theflow then advances to step #1095.

Steps #1095 to #1125 are blocks of lens end processing. In a normaldrive operation, the motor is stopped at the lens end, and in the scandrive operation, the motor is reversed at the lens end.

It is tested in step #1095 if the lens end is reached (ECNT=ELST).

Since the timer interruption is performed every predetermined period oftime, when no pulse is generated at the lens end, the content of thepulse counter is not increased, and the content (ELST) of the pulsecounter in the immediately preceding timer interruption coincides withthe content (ECNT) of the pulse counter in the present timerinterruption.

Therefore, whether or not the lens end is reached can be discriminatedon the basis of the coincidence/noncoincidence of the content of thepulse counter. If NO in step #1095, the flow jumps to step #1115. If YESin step #1095, it is tested in step #1100 if the scan operation is beingperformed (SCAFLG is ON). If NO in step #1100, the flow advances to thestop processing in step #1125. If YES in step #1100, it is tested instep #1105 if the number of times of arrival at the lens end is apredetermined value LX (e.g., 2) (LCOUNT=LX). If YES in step #1105, itis determined that the scan operation is completed, and the flowadvances to step #1120. In step #1120, the scan flag is reset (SCAFLG isOFF), and the scan inhibition flag (NSCFLG is ON) to perform scan endprocessing. The flow then advances to step #1125.

In step #1125, the drive operation of the AF motor executed at the lensend in the normal drive state and upon completion of the scan operationis stopped, and the drive state flag is reset (MOVFLG is OFF). The flowthen advances to step #1130 to return to the main program. On the otherhand, if NO in step #1105, the flow advances to step #1110 to reversethe drive direction of the scan operation, and the content of the lensend counter is incremented by one (LCOUNT=LCOUNT+1), thereby reversingthe drive direction of the AF motor. The flow advances to step #1115.

In step #1115, the content of the last pulse counter is updated(ELST=ECNT), and the flow returns to the main program in step #1130.

FIG. 27 is a flow chart of the pulse counter interruption program.

The pulse counter interruption is performed when an accumulated number(ECNT) of pulses generated by the encoder 52 coincides with an estimatedpulse count (ETM) calculated by the drive control module ○ 10 , and AFmotor drive stop processing after the photographing lens is moved to thein-focus position is performed.

In step #1140, the drive operation of the AF motor is stopped. In step#1145, the drive state flag is reset (MOVFLG is OFF). In step #1150,interruption is inhibited so that pulse counter interruption is nolonger performed thereafter. The flow returns to the main program instep #1155.

The modules of the main programs and the interruption programs of the AFCPU have been described. The modules and the interruption programscontrol the AF operation and the AF motor drive operation in associationwith each other.

In the description of this embodiment, in the pursuit algorithm module 7of the AF CPU, the absolute value (|PRED+PLST|) of the sum of thepresent pursuit defocus amount and the immediately preceding defocusamount is compared with the predetermined value δ to determine whetheror not the pursuit operation is performed (branch at step #490).

As described above, the reason for discriminating whether or not anobject is a moving object, and accordingly determining whether or notthe pursuit operation is performed will be described in detail below.

In a conventional system, whether or not an object is moving isdiscriminated as follows. A present pursuit defocus amount is calculatedas a defocus amount on the basis of the previous and present defocusamounts taking movement of an object during a focus detection cycle intoconsideration, and the present pursuit defocus amount is compared with apredetermined value.

For example, if the present pursuit defocus amount is represented byPRED(0) and the predetermined value is represented by δ, when|PRED(0)|≧δ, it is discriminated that the object is a moving object.When |PRED(0)|<δ, it is discriminated that the object is not a movingobject.

A conventional pursuit operation and discrimination of a moving objectwill be described below with reference to FIG. 28.

In FIG. 28, a solid curve represents a path of movement of thephotographing lens for causing an object image to always coincide withthe film surface for a moving object, and an alternate long and shortdashed curve represents a path of actual movement of the photographinglens. The charge storage of the sensor for AF and the AF calculation areperformed after the photographing lens is stopped, and the chargestorage of the sensor (in FIG. 28, storage time÷0) is performedimmediately after the drive operation.

In the pursuit operation, the drive amount of the photographing lens iscalculated by adding a pursuit correction amount to the defocus amountobtained by the AF operation. For example, in FIG. 28, in the firstdrive operation, its drive amount DRIV(-1) is calculated as a sum of animmediately preceding defocus amount DEF(-1) (corresponding to adifference between the solid curve and the alternate long and shortdashed curve in FIG. 28) and an immediately preceding pursuit correctionamount COMP(-1). A pursuit defocus amount PRED(0), a sum of a presentdefocus amount DEF(0) obtained upon completion of the drive operationand the immediately preceding pursuit correction amount COMP(-1)corresponds to a moving amount of the photographing lens, i.e., a movingamount of an object indicated by the solid curve in one AF cycle (aperiod starting from immediately preceding sensor storage to presentsensor storage), as can be seen from FIG. 28. When the absolute value ofthe pursuit defocus amount PRED(0) is equal to or larger than apredetermined value, it is determined that the object is moving.

However, when only the present pursuit defocus amount is compared withthe predetermined value to discriminate a moving object, erroneousdiscrimination tends to occur due to an error included in the defocusamount DEF(0). In particular, when the object moves slightly, a rate ofan error occupied in the pursuit defocus amount PRED(0) becomesrelatively high. Even if the object movement is uniform, the pursuitoperation is repetitively enabled and disabled, resulting in unstablemovement of the photographing lens.

As described above, when only the present pursuit defocus amount aloneis compared with the predetermined value, a cycle for detecting a movingamount of the object is shortened by one cycle. Therefore, objectmovement is erroneously discriminated upon an influence of random-noisemovement of the object, and slight movement of the object cannot bedetected. Even if the AF cycle is changed, erroneous detection oftenoccurs upon influence of the change.

In the above embodiment, in order to solve the conventional problems,not only the pursuit defocus amount is compared with the predeterminedvalue. As described above, the present pursuit defocus amount and theimmediately preceding pursuit defocus amount are added to each other,and the absolute value of the sum is compared with the predeterminedvalue δ to discriminate the moving object. As a result, the influencesof an error included in the pursuit defocus amount, random-noisemovement of the object, a change in AF cycle, and the like can bestatistically eliminated, and a stable operation is guaranteed.

In general, in place of the processing in step #490 in this embodiment,a result of statistical averaging processing of the pursuit defocusamount is compared with the predetermined value δ, thus allowingdiscrimination of the moving object.

For example, if the present pursuit defocus amount is represented byPRED(0) and a pursuit defocus amount n cycles before the present cycleis represented by PRED(n) (n is a positive integer), discrimination ofstatistical processing given by equation (10) can be performed in step#490.

    |k(0)×PRED(0)+k(1)×PRED(1)+. . .+k(n) ×PRED(n)+. . .+k(N)×PRED(N)|>δ                  (10)

where k(n) is the predetermined weighting coefficient, and N is anarbitrary integer. In this embodiment, N=1 and k(0)=k(1)=1 in equation(10).

In equation (10), when the arbitrary integer N is appropriatelyselected, a period (N×cycle time) for detecting the moving amount of anobject can be selected.

The weighting coefficient k(n) can be set like equation (11) to weightby a latest pursuit defocus amount and to shorten a response time.

    k(0)>k(1)>. . .k(n)>. . .>k(N)                             (11)

The weighting coefficient k(n) can be set like equation (12) inproportion to the parameter SLOP(n) or constant value CONT(n) calculatedin the defocus amount calculation when the pursuit defocus amountPRED(n) is calculated.

    k(n)=k×SLOP(n) or k×CONT(n)                    (12)

where k is the predetermined constant. When the coefficient k(n) is setas in equation (12), the pursuit defocus amount is averaged by a weightproportional to reliability, thus allowing discrimination of the movingobject with higher accuracy.

Each cycle time T(n) is measured to cancel a change in AF cycle time(corresponding to an interval from the end of a first drive operation tothe end of a next drive operation) when the pursuit defocus amountPRED(n) is calculated, and the weighting coefficient k(n) can bedetermined using the measured cycle time as in equation (13). ##EQU7##where k is the predetermined constant.

When the coefficient k(n) is set as in equation (13) and statisticalaveraging processing of equation (10) is executed, a product of eachweighting coefficient and the pursuit defocus amount corresponds to apursuit defocus amount in unit time, and is free from a change in cycletime.

As described above, the pursuit defocus amount undergoes the statisticalaveraging processing, and whether or not an object is a moving object isdiscriminated according to the processing result. The influences of anerror included in the pursuit defocus amount, random-noise movement ofan object, and a change in AF cycle (in particular, the change occurswhen the exposure interrupts the pursuit operation) can be eliminated,and a stable pursuit operation can be assured. In addition, since theinfluences of the error are eliminated, the predetermined value 6 can beset to be small accordingly. Therefore, slight movement of the objectcan be discriminated, and a pursuit operation can be started, thusimproving pursuit performance.

One characteristic feature of the present invention is a pursuittechnique wherein after the release button is fully depressed, themirror-up operation is started a first predetermined time period afterthe beginning of the lens drive operation, a cycle time, e.g., anexposure period, a storage period, and the like is kept constantregardless of a lens drive time, and a photograph in a just-in-focusstate can be obtained at an instant of exposure. An additionaldescription of this pursuit technique will be given below.

The pursuit operation in a continuous photographing mode has thefollowing sequence. More specifically, the mirror-up operation,exposure, mirror-down operation, charge storage, calculation, and lensdrive operation are repeated. Of these operations, the mirror-up andmirror-down operation times of 50 to 100 ms are kept constant and leftunchanged in an identical type of apparatus. An exposure time is almostconstant during the continuous exposure, and is short, e.g., about 30 msor less under a bright condition wherein the pursuit operation isenabled. Thus, the exposure time does not contribute to a variation.Although the storage time depends on the brightness of an object, it isalmost constant in the continuous exposure, and is about 30 ms or lessat a normal brightness. Therefore, the storage time less contributesless to the variation. Although the-calculation time varies depending onan AF system, it becomes a constant value between 20 ms to 100 ms, andits variation during the continuous exposure is small.

In contrast to this, the drive time of the lens varies within the rangeof 0 ms to 100 ms in accordance with the defocus amount for the pursuitdrive operation.

If one cycle consists of the mirror-up operation, exposure, mirror-downoperation, charge storage, calculation, and lens drive operation toconstitute a sequence like in a conventional apparatus, the mirror-upoperation associated with the next cycle is started after theimmediately preceding lens drive operation. If one cycle time is about300 ms (3 frames/sec), one cycle time may be varied between 250 ms to350 ms depending on the drive time.

In the pursuit operation, the following method can be employed so thatan in-focus state can be obtained at an instant of the next exposure.

A pursuit correction amount (COMP) is calculated by the followingequation using a storage period of an immediately preceding cycle, animage surface moving amount (PRED) by object movement during theimmediately preceding cycle, and a time from an intermediate point ofthe last storage time to an intermediate point of the next predictedexposure time. ##EQU8## The photographing lens is driven by a pursuitdrive amount as a sum of the last defocus amount DEF and the pursuitcorrection amount COMP. If the mirror-up operation is performed insynchronism with the end of the drive operation, not only thedenominator but also the numerator of the above equation cause avariation of about 100 ms. For example, the numerator varies within therange of 150 ms to 250 ms. Since the drive time cannot be estimated,variations in the denominator and numerator become large in the methodof starting the mirror-up operation upon completion of the driveoperation, and an appropriate α cannot be determined. Therefore, aneffective pursuit operation cannot be performed.

In this invention, the mirror-up operation is started a firstpredetermined time period T1 after the beginning of the drive operationregardless of the drive time, i.e., whether the drive operation is beingperformed or not.

Thus, the denominator and the numerator of the above equation can berendered almost constant, and the pursuit correction amount COMP iscalculated using the value α determined in this manner. Thus, anin-focus state can be reliably realized at an instant of the nextexposure.

When a power supply capacity for performing a film wind-up operationafter the mirror-down operation is short, the film wind-up and lensdrive operations cannot performed at the same time, and the lens driveoperation is performed after the film wind-up operation is completedeven if the calculation is ended, since the film wind-up time during thecontinuous exposure is almost constant. In this case, the cycle time isnot changed, and no problem is posed.

The above technique will be summarized below in due order:

There are an AF means for repetitively calculating a defocus amount of aphotographing lens; a pursuit correction amount calculating means forcalculating a pursuit defocus amount as a defocus amount upon objectmovement during a defocus detection cycle on the basis of previous andpresent defocus amounts and calculating a pursuit correction amount(COMP) for a pursuit operation on the basis of the pursuit defocusamount; and a lens drive means for driving the lens on the basis of apursuit drive amount (DRIV) obtained by adding the pursuit correctionamount (COMP) to the present defocus amount (DEF).

If a means for controlling timings of mirror-up, storage, and driveoperations is defined as a control means, the control means controls toperform the mirror-up operation after the lapse of a first predeterminedtime period T1 after the beginning of the lens drive operation in acycle of the mirror-up, exposure, mirror-down, storage, calculation, anddrive operations.

The control means limits a time interval capable of driving the lens toa predetermined maximum drive time period (T1+T2). Therefore, when thelens drive operation is not completed after the lapse of the time T2from the mirror-up operation, the control means forcibly stops the lens.

The time T2 is almost equal to a time from the beginning of themirror-up operation to the beginning of exposure, and preferably, almostequal to a time until the drive operation is almost stopped immediatelybefore exposure.

The predetermined maximum drive time period (T1+T2) is preferably set tobe a time wherein the lens can be completely driven by the defocusamount of 3 to 4 mm, e.g., about 100 ms. In this case, if the time T2almost equal to the mirror-up operation is about 50 ms, the maximumdrive time (T1+T2) falls within the range of T1 to 50 ms.

When the drive operation is not completed within the predeterminedmaximum time period and the lens is forcibly stopped, the remainingdrive amount is checked. When the remaining drive amount exceeds apredetermined value, the next pursuit correction is preferablyinhibited. Thus, overrunning caused by the pursuit operation can beprevented depending on the way of movement of a moving object, and ifthe lens overruns, it can be recovered within a short period of time.

In this invention, the cycle of the mirror-up operation during thecontinuous exposure must include a single AF operation. This is tofacilitate estimation of a lens position upon the next exposure sincethe exposure and storage cycles are rendered constant.

Of course, a time after the exposure is ended until the storageoperation is started is controlled to always be constant by the controlmeans.

In this invention, the maximum drive time is determined, and if anecessary drive amount is attained within the determined time, anin-focus state can be achieved at an instant of exposure regardless ofthe drive time. Therefore, complicated time control and drive speedcontrol are not necessary, and corresponding processing can be easilyperformed even if a load varies depending on the types ofinterchangeable lens and a drive speed largely varies.

                                      TABLE 1                                     __________________________________________________________________________    < AFCPUIO SIGNAL >                                                                                                INITIAL                                   IO SIGNAL                                                                            NAME          CONTENT        VALUE                                     __________________________________________________________________________    AF     AF PERMISSION ON AF PERMISSION                                                                             OFF                                              SIGNAL        OFF                                                                              AF INHIBITION                                         MR     MIRROR-UP SIGNAL                                                                            ON MIRROR-UP   OFF                                                            OFF                                                                              MIRROR-DOWN                                           RL     RELEASE PERMISSION                                                                          ON RELEASE     OFF                                              SIGNAL           PERMISSION                                                                 OFF                                                                              RELEASE                                                                       INHIBITION                                            FM     FOCUS MODE SIGNAL                                                                           C, O, M                                                  DM     FRAME SPEED MODE                                                                            C1, C2, S                                                       SIGNAL                                                                 RB     RELEASE BUTTON                                                                              ON FULL DEPRESSION                                                                           OFF                                              SIGNAL        OFF                                                                              NON-FULL                                                                      DEPRESSION                                            __________________________________________________________________________

                                      TABLE 2                                     __________________________________________________________________________    FOCUS MODE AND FRAME SPEED MODE                                                                 FM                                                                            FOCUS MODE                                                  DM                C (CONTINUOUS AF)                                                                         O (ONE-SHOT AF)                                                                           M (MANUAL)                          __________________________________________________________________________    FRAME SPEED MODE                                                              C1                                                                              HIGH-SPEED CONTINUOUS                                                                         PURSUIT DISABLED                                                                          PURSUIT DISABLED                                                                          PURSUIT DISABLED                      PHOTOGRAPHING                                                               C2                                                                              NORMAL CONTINUOUS                                                                             PURSUIT ENABLED                                                                           PURSUIT DISABLED                                                                          PURSUIT DISABLED                      PHOTOGRAPHING                                                               S SINGLE PHOTOGRAPHING                                                                          PURSUIT DISABLED                                                                          PURSUIT DISABLED                                                                          PURSUIT DISABLED                    __________________________________________________________________________

                                      TABLE 3                                     __________________________________________________________________________    (FLAGS FOR AF CPU PROGRAM)                                                                                                   INITIAL                        FLAG  NAME           MEANING                   VALUE                          __________________________________________________________________________    RLSFLG                                                                              MIRROR-UP FLAG 1 IN MIRROR-UP            0                                                   0 NOT IN MIRROR-UP                                       LLMFLG                                                                              LENS END FLAG  1 LENS END                0                                                   0 NOT LENS END                                           LOCFLG                                                                              LOW-CONTRAST FLAG                                                                            1 LOW CONTRAST            0                                                   0 NOT LOW CONTRAST                                       AFMFLG                                                                              AF MODE FLAG   1 IN AF MODE              0                                                   0 NOT IN AF MODE                                         SCAFLG                                                                              SCAN FLAG      1 IN SCAN                 0                                                   0 NOT IN SCAN                                            NSCFLG                                                                              SCAN INHIBITION FLAG                                                                         1 SCAN IHIBITION          0                                                   0 SCAN PERMISSION                                        DRVFLG                                                                              DRIVE FLAG     1 DRIVEN                  0                                                   0 NOT DRIVEN                                             MOVFLG                                                                              DRIVE STATE FLAG                                                                             1 IN DRIVE STATE          0                                                   0 IN STILL STATE                                         DLYFLG                                                                              DELAY FLAG     1 IN DELAY                0                                                   0 NOT IN DELAY                                           AFLFLG                                                                              AF LENS FLAG   1 AF LENS                 0                                                   0 NOT AF LENS                                            FZCFLG                                                                              IN-FOCUS FLAG  1 IN-FOCUS STATE IN NORMAL MODE                                                                         0                                                   0 OUT-OF-FOCUS STATE IN NORMAL MODE                      FIXFLG                                                                              FIX FLAG       1 FIX DISPLAY AND DRIVE   0                                                   0 NOT FIX DISPLAY AND DRIVE                              LOLFLG                                                                              LOW-LUMINANCE FLAG                                                                           1 LOW LUMINANCE           0                                                   0 NOT LOW LUMINANCE                                      ONCFLG                                                                              ONE-SHOT FLAG  1 IN ONE-SHOT MODE        0                                                   0 NOT IN ONE-SHOT MODE                                   PRSFLG                                                                              IN-PURSUIT FLAG                                                                              1 IN PURSUIT              0                                                   0 NOT IN PURSUIT                                         PDYFLG                                                                              PURSUIT DELAY FLAG                                                                           1 IN PURSUIT DELAY        0                                                   0 NOT IN PURSUIT DELAY                                   MIRFLG                                                                              MIRROR FLAG    1 BEFORE MIRROR-UP        0                                                   0 AFTER MIRROR-UP                                        PMDFLG                                                                              PURSUIT MODE FLAG                                                                            1 IN PURSUIT MODE         0                                                   0 NOT IN PURSUIT MODE                                    REVFLG                                                                              DRIVE REVERSE FLAG                                                                           1 DRIVE IN REVERSE DIRECTION                                                                            0                                                   0 DRIVE IN FORWARD DIRECTION                             __________________________________________________________________________

                                      TABLE 4                                     __________________________________________________________________________    DATA AF CPU PROGRAM                                                                                                          INITIAL                        DATA  NAME               CONTENT               VALUE                          __________________________________________________________________________    PCOUNT                                                                              SHOT COUNTER       0 NO RELEASE          0                                                       1 IMMEDIATELY BEFORE 1ST FRAME                                                2 BETWEEN 1ST AND 2ND FRAMES                                                  3 BETWEEN 2ND AND 3RD FRAMES                                                  4 AFTER 3RD FRAME                                    PRED  PURSUIT DEFOCUS AMOUNT                                                                           POSITIVE: NEAR-FOCUS                                                          NEGATIVE: FAR-FOCUS                                  PLST  LAST PURSUIT DEFOCUS                                                                             POSITIVE: NEAR-FOCUS                                       AMOUNT             NEGATIVE: FAR-FOCUS                                  COMP  PURSUIT CORRECTION AMOUNT                                                                        POSITIVE: NEAR-FOCUS                                                          NEGATIVE: FAR-FOCUS                                  DRIV  PURSUIT DRIVE AMOUNT                                                                             POSITIVE: NEAR-FOCUS                                                          NEGATIVE: FAR-FOCUS                                  PRSDLY                                                                              PURSUIT DELAY      RELEASE PERMISSION DELAY TIME                        DEF   DEFOCUS AMOUNT     POSITIVE: NEAR-FOCUS                                                          NEGATIVE: FAR-FOCUS                                  DEFLST                                                                              LAST DEFOCUS AMOUNT                                                                              POSITIVE: NEAR-FOCUS  0                                                       NEGATIVE: FAR-FOCUS                                  SLOP  RELIABILITY        INCLINATION OF INTERPORATION                                                  LINE OF 3-POINT INTERPORATION                        SHIFT SHIFT AMOUNT       POSITIVE: NEAR-FOCUS                                                          NEGATIVE: FAR-FOCUS                                  LCOUNT                                                                              LENS END COUNTER   LENS END COUNT DURING SCAN                                                                          0                              DLY   DRIVE DELAY        DRIVE END DELAY TIME                                 ECNT  PULSE COUNTER      TOTAL ENCODER PULSE COUNT                            ELST  LAST PULSE COUNT   FINAL ENCODER PULSE COUNT                            ETM   ESTIMATED PULSE COUNT                                                                            ESTIMATED PULSE COUNT TO                                                      IN-FOCUS POINT                                       INTT  STORAGE TIME       CCD STORAGE TIME      IZ                             KX    DEFOCUS CONVERSION DEF = KX * SHIFT                                           COEFFICIENT                                                             KB    PULSE CONVERSION   ETM = KL * KB * DEF                                        COEFFICIENT 1                                                           KL    PULSE CONVERSION   ETM = KL * KB * DEF                                        COEFFICIENT 2                                                           FL    LENS FOCAL LENGTH  FOCAL LENGTH OF MOUNTED LENS                         __________________________________________________________________________

                  TABLE 5                                                         ______________________________________                                        (Conditions of performing pursuit Operation)                                  ______________________________________                                        (1)       A pursuit mode is set                                               (2)       A contrast is not low                                               (3)       Reliability is detected                                             (4)       A scan operation is not performed                                   (5)       An immediately preceding drive operation is                                   performed                                                           (6)       A drive direction is not reversed                                   (7)       The sign of a defocus amount is the same as                                   that of a last pursuit defocus amount or                                      defocus amount is small even if the signs are                                 opposite.                                                           (8)       The sign of a pursuit defocus amount is the                                   same as that of a last pursuit defocus amount                       (9)       An absolute value of a sum of a pursuit                                       defocus amount and a last pursuit defocus                                     amount is equal to or larger than the                                         predetermined value δ                                         (10)      A pursuit defocus amount is equal to or                                       smaller than a product of a predetermined                                     value r and a last pursuit defocus amount                           (11)      A pursuit defocus amount is equal to or                                       larger than a product of a predetermined                                      value k and a last pursuit defocus amount                           ______________________________________                                    

As described above, according to the first embodiment of the presentinvention, after the drive direction of the photographing lens isreversed, the pursuit drive operation is inhibited for a predeterminednumber of times of drive operation. An automatic focusing apparatuswhich can prevent hunting near an in-focus point caused by unnecessarypursuit drive operation, has which high stability, and can accuratelypursue an object is provided.

(Second Embodiment)

The second embodiment of the present invention has substantially thesame arrangement as the first embodiment, and can more precisely obtaina pursuit correction amount of the first embodiment. The secondembodiment will be described below with reference to FIGS. 17, 20, 29Aand 29B.

Identification and correction before and after the release button isdepressed and after the first mirror-up operation is performed will besummarized.

As shown in FIG. 17, a means for identifying timings of a driveoperation before full-depression of a release button, a drive operationimmediately after full-depression, a second drive operation afterfull-depression, third and subsequent drive operations afterfull-depression, and calculation of a pursuit correction amount prior tothese operations is provided, and identification results are representedby PCOUNT=0, 1, 2, and 3 shown in FIG. 20.

Before full-depression (PCOUNT=0), the cycle time of storage,calculation, and drive operations is constant, i.e., FO. In order tocalculate the pursuit correction amount (COMP) from the pursuit defocusamount (PRED),

COMP=PRED×α

and, e.g., α=1.

That is, before full-depression, in order to obtain an in-focus state atan intermediate point of a storage time in every cycle, since a cycletime during an immediately preceding storage time is F0 and a timeinterval until the next estimated storage time is also F0, α=F0/F0=1.

After full-depression, since exposure upon completion of the mirror-upoperation is performed between the drive and storage operations, thecycle time of the storage operation is changed. After full-depression,an optimal timing of an in-focus state is changed from the intermediatepoint of the storage time to an intermediate point of exposure(intermediate point means an intermediate time). Therefore, in order toattain an in-focus state during exposure, the pursuit correction amount(COMP) is given by: ##EQU9##

Therefore, immediately after full-depression (PCOUNT=1), the pursuitcorrection amount is given by =F1'/F0.

At a calculation timing (PCOUNT=2) prior to the second drive operationafter the mirror-up operation after full-depression, α=F2'/F1. At acalculation timing (PCOUNT=3) prior to the third and subsequent driveoperations, α=F3'/F2.

In this manner, α is calculated on the basis of its formula, and thepursuit correction amount is calculated accordingly, thus allowing anaccurate pursuit operation.

Since the time in the denominator is a previous amount, its value isdefinite. However, since the numerator is a future value, its value isnot definite.

Of these values, the most indefinite value is a lens drive time. When anapproximate drive amount (DRIV) is calculated while α=1, it can beapproximately determined. Therefore, when the drive time is determinedto have a small margin, a time up to an instant of exposure can bedetermined, and hence, the "time between last storage and next exposure"can be determined.

In this case, the mirror-up operation can be started such that amirror-up instruction is issued at an instance a mirror-up time beforethe instant of predicted exposure.

In practice, as described in the above embodiment, after the releaseoperation, the maximum value of the lens drive time is determinedconstant, and the mirror-up operation can be started after the lapse ofthe predetermined time period (T1) from the beginning of the driveoperation, so that processing can be preferably facilitated.

In this manner, α becomes an identical value after PCOUNT=3. WhenPCOUNT=2 and 3, α may or may not be an identical value. This is causedsince the numerator is F2'=F3' but the denominator is F1=F2 or F1≠F2.When the lens drive operation is started immediately after storage andcalculation operations, F1=F2. If the lens drive operation cannot beperformed until the film wind-up operation is completed after thecalculation is ended, F1≠F2.

In general, when PCOUNT=0, 1, and 2, an optimal α value varies, and itsdetailed value varies depending on design factors, e.g., a mirror-uptime.

The optimal α value may be determined on the basis of the formula of αor may be experimentally determined. In this embodiment, PCOUNT=0, 1, 2,and 3 are identified using α determined in this manner, and an optimalvalue is determined with reference to the table (FIG. 17) of α.

A problem caused by the fact that a moving speed of an image surfacecannot be kept constant with respect to an object which is coming closerat a constant speed will be examined below.

FIGS. 29A and 29B illustrate FIG. 21B in more detail. FIG. 29A shows acase of a photographing lens of f=180 mm, and FIG. 29B shows a case of aphotographing lens of f=400 mm.

In either drawing, a solid curve illustrates a state of movement of animage surface when an object is coming closer at a speed of 10 m/s,while a value obtained by subtracting a given value from a distancebetween a lens and the image surface is plotted along the ordinate.

A dotted curve is drawn while a value obtained by subtracting the givenvalue from a distance between the lens and a predetermined detectionsurface (conjugate with a film surface) is plotted along the ordinatewhen a pursuit operation is ideally performed. The dotted curve crossesthe solid curve at an instant of storage (black dots), thus achieving anin-focus state.

As can be seen from FIGS. 29A and 29B, in the case of the large focallength lens in FIG. 29B, since a rate of change in image surface isalmost constant, a moving amount PRED of the object image surface in animmediately preceding cycle (from storage to storage) can be used as anext estimated moving amount COMP, and hence, α=1.

In contrast to this, in the case of a small focal length lens in FIG.29A, if the value PRED in the immediately preceding cycle is used as thenext estimated value COMP, a pursuit delay occurs, as indicated by abroken curve a. Therefore, α is preferably set to be larger than 1 inthe following equation:

    COMP=PRED×α

To summarize the above conclusion, if a predetermined focal length isrepresented by FX and a focal length of a photographing lens isrepresented by FL, α is determined as in the following table.

    ______________________________________                                                   FL < FX FL ≧ FX                                             ______________________________________                                        α      1.15      1.0                                                    ______________________________________                                    

If the pursuit operation is slightly suppressed for the purpose ofstability, α can be determined as in the following table like the aboveembodiment (α Table in FIG. 17).

    ______________________________________                                                   FL < FX FL ≧ FX                                             ______________________________________                                        α      1.0       0.85                                                   ______________________________________                                    

In this manner, the absolute value of the value α varies depending on adecision timing of an in-focus state or taking stability intoconsideration. In any case, the value α is changed depending on thefocal length of a photographing lens, so that an optimal pursuitoperation can be performed regardless of a focal length of the lens.

The effect of such correction is not conspicuous when the cycle time isshort, e.g., 100 ms or more. However, the effect is conspicuous when thecycle time is 200 ms or more. In particular, when the mirror-upoperation is started and the cycle time becomes 300 ms, the effect isgreatly increased.

A case will be described wherein an object is going away. Whether theobject is going away or coming closer can be easily determined on thebasis of the sign of PRED.

When an object is going away, the moving speed of the lens isdecelerated as indicated by an alternate long and short dashed curve inFIG. 21A. Therefore, if the pursuit drive operation is continued on thebasis of a previous result, the lens tends to overrun. Therefore, thevalue α is preferably set to be smaller than that obtained in a casewherein the object is coming closer.

Such acceleration/deceleration is considerable for a lens having a smallfocal length. In this embodiment, when a focal length is small (FL<FX)with a large deceleration effect like in the α table A in FIG. 17B andwhen PCOUNT=2 and 3 while the cycle time is long and the decelerationeffect is great although the focal length is large, the value α isdecreased to be smaller than that obtained in a case wherein the objectis coming closer.

Factors requiring a change in α include a focal length of thephotographing lens, a moving direction of an object, a release timing, acycle time, and the like. In practice, these factors are combined, and amechanism depends on a time constant. Therefore, the α table classifiedas shown in FIG. 17 is stored, and a value α depending on a conditioncan be preferably used. An optimal value can be experimentallydetermined, and an optimal value of α changes if a body is changed and atime constant of a mechanism is changed. However, an appropriate optimalvalue of α falls within the range of 0.5≲α≲1.5.

(Third Embodiment)

The third embodiment of the present invention has substantially the samearrangement as the first embodiment, and can facilitate an in-focusdisplay in the first embodiment. The third embodiment will be describedhereinafter with reference to FIGS. 30 to 32.

In the in-focus discrimination/display module 8 in the AF CPU programshown in FIG. 7, when the pursuit operation is being performed and thelens end is not reached as shown in steps #590 to #605 in FIG. 22, boththe indicators 41 and 43 of the AF display means 40 are activated to beset in a display mode different from the normal AF state display, thuscausing a user to recognize that the pursuit operation is beingperformed.

The user can know with this display that an object is moving, and canset a photographing condition for a moving object, e.g., can select anaperture and a shutter speed.

An additional description of a display technique during a pursuitoperation will be made with reference to another embodiment.

In step #605 in FIG. 22, a pursuit operation display is made by the AFdisplay means 40. In another embodiment, the pursuit operation displaycan be displayed by a display means other than the AF display means 40.

FIG. 30A shows an arrangement of the embodiment when a pursuit displaymeans 45 is provided. In FIG. 30A, the pursuit display means 45 iscontrolled by a port P13 of the AF CPU 30 shown in FIG. 1. The pursuitdisplay means 45 has a pursuit indicator 46, and the pursuit indicator46 is activated while the pursuit operation is being performed, thusinforming a user that the pursuit operation is being performed.

FIG. 31A shows part of a program of the AF CPU shown in FIG. 7 of thisembodiment. Step #605 in FIG. 22 is replaced with step #2010 in FIG.31A. Therefore, when the pursuit operation is being performed and thelens end is not reached, the indicator 46 of the pursuit display means45 is activated in step #2010.

Although not shown in the flow chart, when the pursuit operation is notperformed or the lens end is reached, the indicator 45 of the pursuitdisplay 46 is inactivated to display that the pursuit operation is notperformed.

After step #2010, an AF display by the AF display means 40 can beperformed according to the present defocus amount DEF, as shown in FIG.22 or all the indicators of the AF display means 40 can be inactivated.

FIG. 30B shows an arrangement of an embodiment wherein the pursuitdisplay means 45 displays that the pursuit operation is being performed,and a moving direction (coming closer or going away) of the object.

In FIG. 30B, the pursuit display means 45 has indicators 47 and 48, andis controlled by the AF CPU 30 through the port P13. When the indicator47 is activated, this indicates that an object is going away, and whenthe indicator 48 is activated, this indicates that the object is comingcloser. When either the indicator 47 or 48 is activated, this indicatesthat the pursuit operation is being performed.

FIG. 31B shows part of a program of the AF CPU of this embodiment. Step#605 in FIG. 22 is replaced with steps #2015 to #2025 in FIG. 31B.

When the pursuit operation is being performed and the lens end is notreached, the sign of the pursuit drive amount DRIV is tested in step#2015. If the sign 1 is negative, the indicator 48 of the pursuitdisplay means 45 is activated and the indicator 47 is inactivated toindicate that the pursuit operation is being performed and the object iscoming closer in step #2020. If it is determined in step #2015 that thesign is positive, the flow advances to step #2025, and the indicator 47is activated and the indicator 48 is inactivated to indicate that thepursuit operation is being performed and the object is going away.

Although not shown in the flow chart, in the above embodiment, when thepursuit operation is not performed or when the lens end is reached, boththe indicators 47 and 48 of the pursuit display means 45 are turned offto indicate that the pursuit operation is not performed.

Processing after step #2020 or #2025 is the same as that in the aboveembodiments. In this embodiment, since a user can know a pursuitdirection, a pursuit operation in a direction that the user does notintend to perform can be canceled by an operation of another means(e.g., half depression of the release button or a special-purposebutton).

In FIG. 30B, the indicators 47 and 48 for indicating the movingdirections of an object are represented by triangular indication marksbut may be other marks. For example, marks "○ " and "x" can be used forthe indicators 47 and 48.

FIG. 30C shows an arrangement of an embodiment wherein the pursuitdisplay means 45 displays an AF operation state during the pursuitoperation. In FIG. 30C, the pursuit display means 45 has indicators 53,54, and 55, which are controlled by the port P13 of the AF CPU 30.Active states of the indicators 53, 54, and 55 respectively indicatenear-focus, in-focus, and far-focus states in the pursuit state.

FIG. 31C shows part of a program of the AF CPU of this embodiment. Step#605 in FIG. 22 is replaced with steps #2030 to #2085 in FIG. 31C.

When the pursuit operation is being performed and the lens end is notreached, it is tested in step #2030 if the first or subsequent releaseoperation is finished. If NO in step #2030, processing in steps #2035 to#2055 is executed.

FIG. 32A shows an ideal path (solid curve) and a drive path (alternatelong and short dashed curve) of the photographing lens with respect to amoving object when no release operation is performed. The photographinglens is pursuit-driven to have a sequence of storage, calculation anddrive operations as one cycle. When the pursuit drive operation of thephotographing lens is ideally performed, the solid curve and thealternate long and short dashed line cross at an intermediate point Imof a storage time of the image sensor. In this case, the defocus amountDEF calculated from the storage time during the pursuit operation shouldbe 0. In steps #2035 to #2055, the in-focus, near-focus, and far-focusstates are discriminated in accordance with the defocus amount on thebasis of the above-mentioned idea.

In step #2035, it is tested if the absolute value of the defocus amountis larger than a predetermined value ZONEF. In general, since a defocusamount calculated during the pursuit operation has poorer accuracy thanthat calculated in a still state, the predetermined value ZONEF ispreferably set to be larger than predetermined values Z1, Z2, Z3, Z4,and Z5 used for AF discrimination shown in FIG. 22 to stabilize display.

If NO in step #2035, the indicator B4 is activated in step #2040 toindicate an in-focus state in the pursuit operation.

If YES in step #2035, the flow advances to step #2045, and the sign ofthe defocus amount DEF is tested. If the sign is positive, the indicator53 is activated to indicate a near-focus state in the pursuit operation.

If it is determined in step #2045 that the sign is negative, theindicator 55 is activated to indicate a far-focus state in the pursuitoperation.

On the other hand, if it is determined in step #2030 that the first orsubsequent release operation is finished, processing in-steps #2060 to#2085 is executed.

FIG. 32B shows an ideal path (solid curve) and a drive path (alternatelong and short dashed curve) of the photographing lens with respect to amoving object when a release operation is performed. The photographinglens is pursuit-driven to have a sequence of storage, calculation anddrive operations as one cycle. When the pursuit drive operation of thephotographing lens is ideally performed, the solid curve and thealternate long and short dashed line cross at an intermediate point ofan exposure (exposure). In this case, a defocus amount calculated fromthe storage time during the pursuit operation, i.e., an amountcorresponding to a difference between the solid curve and an alternatelong and short dashed curve at an intermediate point Im of the storagetime in FIG. 32B does not become 0, and ideally becomes a moving amountHX of the photographing lens along the ideal path (solid curve) during atime interval between an intermediate point Em of the exposure and theintermediate point Im of the storage time.

If an actual moving amount of the photographing lens between theintermediate point (e.g., Im1) of the present storage time and anintermediate point (e.g., Im0) of the immediately preceding storage timeis represented by DLST (corresponding to the immediately preceding driveamount), a time interval between the intermediate point (Im1) of thepresent storage time and the intermediate point (Im0) of the immediatelypreceding storage time is represented by TE, and a time interval betweenthe intermediate point (Im1) of the present storage time and anintermediate point (Em1) of the present exposure is represented by TD,the amount HX is given by:

    HX=DLST×TD/TE                                        (14)

The amount DLST can be obtained by storing the immediately precedingdrive amount, and the time intervals TD and TE can be obtained bymeasuring a time by a timer or the like incorporated in the AF CPU.

Therefore, in steps #2060 to #2085, in-focus, near-focus, and far-focusstates are discriminated in accordance with a value obtained bysubtracting the predetermined value HX from the defocus amount on thebasis of the above-mentioned concept.

In step #2060, the amount HX is calculated according to equation (14).In step #2065, it is tested if the absolute value of a value obtained bysubtracting the amount HX from the present defocus amount is larger thana predetermined value ZONER. The predetermined value ZONER is set to beequal to or slightly larger than the predetermined value ZONEF.

If NO in step #2065, the flow advances to step #2070, and the indicator54 is activated to indicate an in-focus state in the pursuit operation.

If YES in step #2065, the sign of the value obtained by subtracting theamount HX from the defocus amount is tested. If the sign is positive,the indicator 53 is activated in step #2080 to indicate a near-focusstate in the pursuit operation.

If it is determined in step #2075 that the sign is negative, the flowadvances to step #2085, and the indicator 55 is activated to indicate afar-focus state in the pursuit operation. Processing after step #2040,#2050, #2055, #2070, #2080, or #2085 is the same as that in the aboveembodiments. In this case, all the indicators of the AF display means 40are preferably kept off.

Although not shown in the flow chart, in the above embodiment, when thepursuit operation is not performed or the lens end is reached, all theindicators 53, 54, and 55 of the pursuit display means 45 are turned offto indicate that no pursuit operation is performed.

In the above embodiments, in-focus discrimination is performed uponcomparison with the predetermined value ZONEF or ZONER in step #2035 or#2065. In general, as shown in FIG. 21, an ideal lens speed is decreasedfor an object which is going away at a constant speed as the timeelapses, and ideal lens speed is increased for an object which is comingcloser at a constant speed as the time elapses. Thus, when an in-focusdiscrimination zone of the sign "-" (near-focus state; object is comingcloser) is set to be larger than that of the sign "+" (far-focus; objectis going away), a display can be more stabilized.

In this embodiment, a user can confirm whether or not a pursuitoperation is being performed, and can know an AF state in the pursuitoperation. Therefore, he or she need only perform a release operationaccording to the AF state. For example, when the in-focus state isobtained during the pursuit operation, he can perform the releaseoperation.,

In the above embodiments, the pursuit display means 45 is provided inaddition to the AF display means 40. If information indicating whetheror not the pursuit operation is being performed is unnecessary, the AFdisplay means 40 can also serve as the pursuit display means 45.

In this case, since the AF state display can be performed in the samemanner as in a normal state (wherein no pursuit operation is performed),a user does not feel uneasy, and a display during the pursuit operationcan be stabilized.

Note that in expression of the indicators in FIGS. 22, 31A, 31B, and31C, a solid line indicates an active state, and a broken line indicatesan inactive state.

In the embodiments shown in FIGS. 30A, 30B, and 30C and FIGS. 31A, 31B,and 31C, the display means 45 displays whether or not the pursuitoperation is being performed. However, the present invention is notlimited to this. For example, a user can know the pursuit operation by asound or the like.

Automatic control of particular operation means of the camera can beperformed when the pursuit operation is being performed displayed. Forexample, when the pursuit operation is being performed, a high shutterspeed, a smaller aperture, or the like can be automatically set.

As described above, according to the third embodiment of the presentinvention, since the presence/absence of movement of an object isdisplayed, a user can recognize the movement of the object, and can takea corresponding reaction for the moving object. In addition, aconventional problem caused when only an AF state of a photographinglens is displayed for a moving object and a user cannot distinguish astill object from a moving object, e.g., an out-of-focus photographcaused by misjudgement of accuracy can be prevented.

If a member for displaying an AF state of the photographing lens is alsoused as a member for displaying a moving state of an object, cost is notincreased, and user confusion can be avoided.

The principle of a fourth embodiment of the present invention will nowbe described.

FIG. 33 shows a pursuit state, and illustrates a path (solid curve P) ofa image forming surface of an moving object and a path (dotted curve Q)of a predetermined image forming surface conjugate with a film surface.In FIG. 33, a time t is plotted along the abscissa, and a distancebetween the image forming surface and a virtual single lens along anoptical axis is plotted along the ordinate. In FIG. 33, coordinates(t_(n),x_(n)) represent charge storage start time t_(n) and a positionx_(n) of the predetermined image forming surface at that time,coordinates (t_(n) ',x_(n) ') represent charge end time t_(n) ' and aposition x_(n) ' of the predetermined image forming surface at thattime, and coordinates (t_(n) ⁰,x_(n) ⁰) represent AF calculation endtime t_(n) ⁰ and a position x_(n) ⁰ of the predetermined image formingsurface at that time. The curve Q represents a drive state without apursuit operation, and follows the path P of an object image. A curve Q'represents a pursuit drive state. The pursuit operation is performedalong the path P, and an approximate in-focus state is alwaysmaintained. A difference between Q' and Q corresponds to a pursuitcorrection amount C_(n) calculated by a correction section 100.

During the storage/calculation time interval (t₁ to t₁ ⁰), the lens isnot moved, x₁ =x₁ '=x₁ ⁰. An out-of-focus amount D₁ at time (t₁ +t₁ °)/2becomes a difference (X₁ -x₁ ⁰) in distance between points a₁ and b₁,and a defocus amount calculated by an AF section 101 at the calculationend time t₁ ⁰ is equal to this value D₁ if there is no detection error.Thereafter, an nth defocus amount calculated by the AF section 101 isrepresented by D_(n) hereinafter.

A drive operation is performed until the image surface moving amountbecomes equal to the defocus amount D₁ while counting feedback pulsesusing the defocus amount D₁ calculated at the time t₁ ⁰. As describedabove, an image surface moving amount ΔBf per unit moving amount of thephotographing lens varies depending on photographing lenses, and afeedback pulse count Δn giving a lens moving amount also tends to varydepending on photographing lenses. A conversion coefficient K_(B) forconverting the image surface moving amount ΔBf into the feedback pulsecount An according to the relationship Δn=K_(B) ×ΔBf is stored, andactual drive control is performed using this coefficient.

The storage operation is restarted at time t₂ at which the lens driveoperation is almost converged. A second defocus amount D₂ is calculatedat time t₂ ⁰ and is equal to a value (X₂ -x₂ ⁰) corresponding to adifference between points a₂ and b₂ as an out-of-focus amount at anintermediate point of the storage time (t₂ to t₂ ') if there is noerror. If an object stands still and a detection error is sufficientlysmall, the defocus amount D₂ becomes much smaller than the amount D₁. Inprinciple, the presence/absence of movement of an object can bediscriminated on the basis of the ratio of these values.

When an image surface is moved at a constant speed, in a follow-up statewithout pursuit correction drive operation, each calculated defocusamount D_(n) is never converged to zero and becomes an almost constantvalue, thus yielding D_(n) /D_(n-1) ÷1. If this value is monitored, thepresence/absence of movement of an object can be discriminated. However,when a photographing lens is driven by an additional correction driveoperation in addition to a drive operation on the basis of a normaldefocus amount like a characteristic curve Q' in FIG. 9, it is difficultto discriminate the presence/absence of movement of an object using thecalculated defocus amounts D_(n) and D_(n-1).

An amount P_(n) given by equation (15) is calculated as a pursuitdefocus amount, and is used as a reference value.

    P.sub.n =D.sub.n +(immediately preceding drive amount)-D.sub.n-1(15)

Equation (15) is one at time t_(n) ⁰ at which an nth defocus amountD_(n) is calculated. In equation (15), D_(n) is the presently calculateddefocus amount, and D_(n-1) is the immediately preceding defocus amount,i.e., the previous defocus amount. The (immediately preceding driveamount) is the value X(n-1) actually driven by the drive operation ofthe photographing lens between times t⁰ _(n-1) to t_(n) or a calculatedvalue D_(n-1) ' as a reference value for driving the lens by the amountX(n-1). Of course, if there is no error, these values are equal to eachother (D_(n) '=X(n)).

If the correction amount for the pursuit operation is represented byC_(n), the drive amount D_(n) ' is given by:

    D.sub.n '=D.sub.n +C.sub.n                                 (16)

Using this equation, equation (15) can be rewritten as:

    P.sub.n =D.sub.n +C.sub.n-1.                               (15)'

As can been seen from FIG. 33 according to the definition of equation(15), if n≧3, the pursuit defocus amount P_(n) is a difference indistance between points a_(n) and a_(n-1) (e.g., P₄ =D₄ +C₃) i.e., adrive amount of an object image.

Whether or not an object is moving is discriminated by comparing P_(n)/P_(n-1) and a predetermined constant (threshold value) k. Inconsideration of the influence of various errors, a practical range ofthe constant k is:

    0.3≦k≦0.8

An optimal range is 0.4≦k≦0.6. When P_(n) /P_(n-1) ≧k, it is determinedthat the object is moving. An image surface moving amount correspondingto movement of an object in one cycle at this time is given by almostP_(n).

The pursuit correction amount C_(n) for a pursuit operation iscalculated. More specifically, when an object movement discriminationsection 100b determines that an object is moving,

    C.sub.n =P.sub.n

When it determines that an object is not moved,

    C.sub.n =0

However, with this apparatus, an acceleration of movement of an imagesurface is not taken into consideration. For example, even when anobject is coming closer at a constant speed, a moving speed of an imagesurface is abruptly increased in a small focal length lens as an objectis coming closer, and a pursuit operation tends to be delayed. When anobject is going away, the moving speed of the image surface is abruptlydecreased, and a pursuit operation tends to overrun.

In the fourth embodiment of the present invention, when a moving objectis pursued, a drive amount of the photographing lens is corrected takingan acceleration component of movement of an image surface intoconsideration.

As described above, the pursuit defocus amount P_(n) corresponds to animage surface moving amount corresponding to object movement in onecycle of the sequential lens drive processing. Therefore, assuming thatthe image surface moving speed is almost constant, pursuit defocusamounts P_(n) in respective cycles are almost equal to each other.Therefore, the pursuit defocus amount P_(n) can be directly used as thepursuit correction amount C_(n) as an estimated value of image surfacemovement and used in the next lens drive operation. This technique is alens drive technique described in the prior art. However, if the imagesurface moving speed is not constant, the estimated value P_(n) used inthe immediately preceding lens drive operation cannot be directly usedin a next lens drive operation. More specifically, when an image surfaceis accelerated, a value larger than the estimated value P_(n) used inthe immediately preceding cycle must be used. On the other hand, if theimage surface is decelerated, a value smaller than the estimated valueP_(n) used in the immediately preceding cycle must be used.

In this embodiment, information associated with an acceleration of theimage surface is calculated from two, i.e., new and old pursuit defocusamounts (estimated values) P_(n) and P_(n-1), and the latest pursuitdefocus amount P_(n) is corrected according to the calculatedacceleration, thereby calculating the pursuit correction amount C_(n)used in the next lens drive operation.

An image surface moving amount upon movement of an object is estimatedon the basis of the present defocus amount D_(n), present and previouspursuit defocus amounts P_(n) and P_(n-1), and the previous pursuitcorrection amount C_(n-1) taking an image surface acceleration intoconsideration, thus calculating a new pursuit correction amount C_(n).More specifically, the present pursuit defocus amount P_(n) iscalculated by:

    P.sub.n =D.sub.n +C.sub.n-1                                (17)

A parameter β representing an image surface acceleration (to be referredto as an image surface acceleration parameter hereinafter) is calculatedby: ##EQU10## A new pursuit correction amount C_(n) is calculated by:

    C.sub.n =α·P.sub.n                          (19)

In this embodiment, α=β.

For this purpose, the pursuit defocus amount P_(n) is calculated on thebasis of equation (17), and it is checked if |P_(n) |>k×|P_(n-1) |,thereby discriminating the presence/absence of movement of an object.Then, the image surface acceleration parameter β is calculated on thebasis of equation (18), and a correction term α is calculated from theacceleration parameter β. On the basis of equation (19), the pursuitcorrection amount C_(n) is calculated.

The drive sequence of the photographing lens according to thisembodiment will be described below with reference to FIG. 34.

Initialization is performed in step S1. A storage operation is startedin step S2, and is ended in step S3. An AF calculation is started instep S4, and is ended in step S5, thus calculating the defocus amountD_(n). When the AF section 101 outputs the defocus amount D_(n), thelens drive operation is normally performed on the basis of this data.However, in this embodiment, the defocus amount D_(n) undergoesprocessing for a pursuit drive operation.

In step S6, a pursuit defocus amount P_(n) is calculated on the basis ofequation (17). If |P_(n) |>k×|P_(n-1) | in step S7, it is determinedthat an object is moving. If it is determined in step S7 that the objectis moving, the flow advances to step S8. In step S8, the image surfaceacceleration β is calculated on the basis of equation (18). In step S9,the correction term α is calculated from the image surface accelerationβ. In this embodiment, β is directly used as α. In step S10, the pursuitcorrection amount C_(n) is calculated on the basis of equation (19). Ifit is determined in step S7 that the object is not moved, 0 issubstituted in C_(n) in step S15.

A drive amount D_(n) ' (D_(n) +C_(n)) is calculated in step S11, andvalues P_(n) and C_(n) necessary for the next calculation are stored instep S12. In step S13, a lens drive operation is started. Drive controlis performed using the correspondence between the value D_(n) ' and thefeedback pulse count in association with the stored conversioncoefficient K_(B). In step S11, the drive amount D_(n) ' is calculatedas (D_(n) +C_(n)) to perform a lens drive operation. However, thepresent invention is not limited to this. For example, C_(n) may bediffused and may be added to D_(n) in one drive control cycle, so that alens drive operation is continuously performed during the storageoperation and AF calculation. If it is determined in step S14 that adrive stop condition is satisfied, the lens drive operation is stopped.The flow then returns to step S2, and the storage operation isrestarted.

A path Q' of the AF surface (film conjugate surface) by the lens driveoperation on the basis of the above processing sequence and a path P ofthe image surface will be described in detail below with reference toFIG. 35.

In FIG. 35, the image surface path represented by the solid curve Pindicates a case wherein the image surface is accelerated, and the pathof the AF surface following the image surface is represented by a brokencurve Q'. The lens drive processing consists of a cycle of the chargestorage operation to a CCD image sensor, a calculation of the defocusamount D_(n) and the pursuit correction amount C_(n), and the lens driveoperation, and a difference between an image surface at an intermediatepoint of the storage time and the AF surface is subjected to the AFoperation. If a circle PT is present time, the latest (present) defocusamount D_(n) is known. An image surface moving amount in an immediatelypreceding cycle, i.e., the pursuit defocus amount P_(n) can becalculated using equation (17) on the basis of D_(n) and the pursuitcorrection amount C_(n-1) used in the immediately preceding lens driveoperation. Note that equation (17)' may be used in place of equation(17). ##EQU11##

The acceleration parameter β is calculated from the pursuit defocusamount P_(n-1) similarly calculated in the immediately preceding lensdrive operation and the presently calculated pursuit defocus amountP_(n). If the acceleration parameter β is not taken into considerationin the next lens drive operation, the pursuit correction amount C_(n) isequal to P_(n), and becomes a value indicated by ξ in FIG. 35. For thisreason, a pursuit operation cannot be satisfactorily performed, and adifference between the image surface and the AF surface upon exposure islarge. When the acceleration parameter β is taken into consideration inthe next lens drive operation as in this embodiment, as described above,the pursuit correction amount C_(n) is given by α×P_(n), and becomes avalue indicated by η in FIG. 35. As a result, the difference between theimage surface and the AF surface upon exposure is decreased, and ahigh-accuracy pursuit operation can be performed.

FIG. 35 shows characteristic curves when an object is coming closer tothe camera at a constant speed. As shown in FIG. 36, when an object isgoing away from the camera at a constant speed, the image surface speedis decreased as the time elapses. In this case, pursuit accuracy can beimproved as in FIG. 35.

The acceleration parameter β calculated from P_(n) and P_(n-1) isdirectly used as α. However, when β is considerably large, such anacceleration parameter calculation must not be performed, and may be adetection error. For example, if β>>1.5, α=1.5; when 1.5>β>0.5, α=β; andwhen β<0.5, α=0.5. Note that the upper limit value of α is preferablyabout 1.3 to 2.

Alternatively, α can be obtained with reference to the following tablein correspondence with β.

    ______________________________________                                        β                                                                             1.5 or more                                                                             1.5 ˜ 1.4                                                                        . . .                                                                              1.1 ˜ 0.9                                                                      . . .                                                                              0.8 or less                          α                                                                            1.3       1. 2     . . .                                                                              0.8    . . .                                                                              0.5                                  ______________________________________                                    

According to such a correspondence, since the value α becomes smallerthan the value β, an overrun tendency can be suppressed. In the aboveembodiment, the image surface acceleration parameter β is calculatedfrom the ratio of the new and old pursuit defocus amounts P_(n) andP_(n-1). However,

    γ=P.sub.n -P.sub.n-1

may be calculated, and the correction term α may be calculated from thisimage acceleration parameter γ. In this case, γ and α have the followingcorrespondence.

(1) When α=γ,or

(2) when |γ| is equal to or larger than a predetermined value,

α=predetermined value ×γ/|γ|.

Otherwise, α=γ may be set. In this case, since γ is limited, anoperation can be stabilized.

(3) α can be calculated by α=γ×q (where q falls within the range of 0.5to 1). In this case, an overrun tendency can be suppressed.

FIG. 37 shows the sequence of this case. When the correction term α isused, the pursuit correction amount C_(n) is calculated from P_(n) +α,as in step S10' in FIG. 37.

Another embodiment for calculating the correction term α will bedescribed below with reference to FIG. 38. In this embodiment, thecorrection term α of the image surface acceleration is calculated on thebasis of a separation Y of the object from infinity.

The separation Y from infinity means a value Y in a so-called Newton'sformula defining the following relation:

    A×Y=f×f

where A is the distance between an object-side focal point and anobject, Y is the distance between an image-side focal point and an imagesurface, and f is the focal length. The separation Y can be calculatedon the basis of an extension amount from infinity of a lens. When aphotographing lens to be used is not a whole-group extension type, themoving amount of the lens does not directly correspond to Y. In thiscase, the relationship between the lenses and Y can be stored asequations or tables, thus allowing calculation of Y.

More specifically, the, separation Y can be calculated by the followingmethods.

(1) When a photographing lens comprises a distance encoder, an objectdistance A or magnification M is read from the output of the encoder,and at the same time, the focal length f is read from a lens ROM of thephotographing lens. On the basis of these values, the separation Y iscalculated:

    Y=f×f/A or

    Y=f/M.

(2) When a photographing lens does not comprise the distance encoder, anaccumulation value of a pulse count after the lens abuts against aninfinity end is counted. This count value corresponds to the position ofa distance ring. Thus, the separation Y is calculated on the basis ofthe accumulated value and the conversion coefficient K_(B) read fromlens information to convert the pulse count into a defocus amount.

When an object is moved at a constant speed, the image surfaceacceleration parameter β can be calculated by:

    β=1+2×P.sub.n /Y.

The pursuit correction amount C_(n) is calculated using the imagesurface acceleration parameter β in the same manner as described above,thus calculating the lens drive amount D_(n) '.

In the above description, a cycle of a storage operation of the CCDimage sensor, which is started upon half depression of the releasebutton, a calculation of a lens drive amount, and a lens drive operationis constant. A case will be described wherein the mirror-up operation isincluded in the cycle upon full-depression of the release button. When amirror-up operation is permitted in response to full-depression of therelease button, an actual mirror-up operation is performed after thelens drive operation or after the lapse of a predetermined period oftime from the beginning of the lens drive operation.

FIG. 39 is a diagram showing a case wherein the half-depression state ofthe release button changes to the full-depression state. In FIG. 39, Pis the path of the image forming surface, and Q' is the path of the AFsurface as in FIG. 35.

In FIG. 39, before full depression, the storage, calculation, and thedrive operations are performed in a period F₀. After full depression,various exposures including the mirror-up operation are performedbetween the storage/calculation operation and the drive operation. Theimage forming surface and the AF surface preferably coincide at theintermediate point (indicated by E in FIG. 39, and corresponding to acentral timing during exposure time) of exposure during the exposure.The full-depression operation is detected, and the lens drive amountimmediately before the mirror-up operation is increased as compared tothat in the half-depression state. In the continuous photographing mode,a plurality of mirror-up operations are performed in response to thefull-depression operation. In this case, since the period of one cycleupon the first mirror-up operation is different from that of a cycleupon a second or subsequent mirror-up operation, an identificationsection for identifying the present exposure state is provided, and itsidentification result PCOUNT is set to be 0 in a full-depression state;1 in a first mirror-up state; 2, in a second mirror-up state; and 3, ina third mirror-up state.

A correction method of a lens drive amount upon variation in cycle whenthe image surface moving speed is constant will be described below.

The pursuit correction amount C_(n) before full-depression is given by:

    C.sub.n =P.sub.n ×α for α=1              (19)

Before full-depression, an in-focus state is obtained at everyintermediate point of the storage operation. Therefore, a cycle time F₀between adjacent storage operations is constant, and α=F₀ /F₀ =1.However, after full-depression, an instant of an optimal in-focus statemust correspond to an intermediate point of exposure. For this purpose,the correction term α is calculated as: ##EQU12##

Therefore, in the mirror-up operation after full-depression, i.e., whenPCOUNT=1, α is calculated by: ##EQU13## After the second mirror-upoperation, i.e., when PCOUNT=2, α is calculated by: ##EQU14##Furthermore, after the third mirror-up operation, i.e., when PCOUNT=3, ais calculated by: ##EQU15##

In this manner, the correction term α is calculated using equation (2)to calculate the pursuit correction amount C_(n). Thus, high-accuracypursuit operation can be performed while compensating for a variation incycle time. Therefore, a more accurate pursuit operation can beperformed taking a compensation upon variation in cycle time andcorrection using an image surface acceleration-into consideration.

The pursuit correction amount is calculated as follows.

The correction term α corresponding to the identification result PCOUNTis obtained as in the table below, and the pursuit correction amountC_(n) can be calculated from equation (19).

    ______________________________________                                        P count     = 0         α = β                                                  = 1         α = F.sub.1' × β/F.sub.0                         = 2         α = F.sub.2' × β/F.sub.1                         = 3         α = F.sub.3' × β/F.sub.2             ______________________________________                                    

F₁ '/F₀, F₂ '/F₁, and F₃ '/F₂, can be obtained by measuring a time fromthe storage operation to the beginning of the lens drive operation, andadding it to a time from the mirror-up to the intermediate point toexposure (by calculation). Alternatively, typical values can beprestored as numerical values, and used.

In the above description, the lens drive operation is intermittentlyperformed together with the pursuit correction amount. The lens may becontinuously driven to achieve the pursuit correction amount in theentire cycle.

What is claimed is:
 1. An automatic focusing apparatuscomprising:focusing means for repetitively detecting a defocus amount ofa photographing lens; moving object discriminating means fordiscriminating on the basis of present and previous defocus amountswhether or not an object is moving; pursuit correction amountcalculating means for calculating a pursuit correction amount for amoving object on the basis of the present and previous defocus amounts;lens drive means for calculating a drive amount of said photographinglens on the basis of the present defocus amount when said moving objectdiscriminating means discriminates that the object is not moving, andfor calculating the drive amount of said photographing lens on the basisof a pursuit drive amount as a sum of the present defocus amount and thepursuit correction amount when said moving object discriminating meansdiscriminates that the object is moving, so as to drive saidphotographing lens; and pursuit enable/disable determining means fordetermining whether said lens drive means calculates the drive amount ofsaid photographing lens on the basis of the discrimination result ofsaid moving object discriminating means or calculates the drive amountof said photographing lens on the basis of the present defocus amount,wherein when a drive direction of said photographing lens is reversed,said pursuit enable/disable determining means causes said lens drivemeans to calculate the drive amount of said photographing lens on thebasis of the present defocus amount to drive said photographing lens ina predetermined number of drive operations after the reversal.
 2. Anautomatic focusing apparatus comprising:focusing means for repetitivelydetecting a defocus amount of a photographing lens; means forcalculating a change in defocus amount caused by movement of an objecton the basis of previous and present defocus amounts; driving means fordriving said photographing lens on the basis of a defocus amount; andcorrecting means for correcting the detected defocus amount of the lenson the basis of the calculated change, wherein when a drive direction ofsaid photographing lens is reversed, said correcting means does notcorrect the detected defocus amount in a predetermined number of driveoperations after the reversal, and wherein when said predeterminednumber of drive operations after the reversal have been completed, saidcorrecting means corrects the detected defocus amount.
 3. An automaticfocusing apparatus comprising:focusing means for repetitively detectinga defocus amount of a photographing lens; moving object discriminatingmeans for discriminating on the basis of present and previous defocusamounts whether or not an object is moving; pursuit correction amountcalculating means for calculating a pursuit correction amount for amoving object on the basis of the present and previous defocus amounts;lens drive means for calculating a drive amount of said photographinglens on the basis of the present defocus amount when said moving objectdiscriminating means discriminates that the object does not move, andfor calculating the drive amount of said photographing lens on the basisof a pursuit drive amount as a sum of the present defocus amount and thepursuit correction amount when said moving object is moving, so as todrive said photographing lens; pursuit enable/disable determining meansfor determining whether said lens drive means calculates the driveamount of said photographing lens on the basis of the discriminationresult of said moving object discriminating means or calculates thedrive amount of said photographing lens on the basis of the presentdefocus amount, wherein when a drive direction of said photographinglens is reversed, said pursuit enable/disable determining means causessaid lens drive means to calculate the drive amount of saidphotographing lens on the basis of the present defocus amount to drivesaid photographing lens in a predetermined number of drive operationsafter the reversal; and driving control means for detecting that thepresent defocus amount is within a predetermined amount, said drivingcontrol means inhibiting the drive operation of said lens drive meanscorresponding to the present defocus amount when the present defocusamount is within a predetermined amount, wherein said pursuitenable/disable determining means, after the inhibiting of the operationof said driving control means, causes said lens drive means to calculatethe drive amount of said photographing lens on the basis of the presentdefocus amount.
 4. An automatic focusing apparatus comprising:focusingmeans for repetitively detecting a defocus amount of a photographinglens; correcting means for correcting said defocus amount of the lens onthe basis of previous and present defocus amounts; and lens drive meansfor driving the lens on the basis of the present corrected defocusamount when an absolute value of the sum of the previous and presentdefocus amounts is larger than a predetermined value.
 5. An automaticfocusing apparatus comprising:focusing means for repetitively detectinga defocus amount of a photographing lens; correcting means forcorrecting said defocus amount of the lens on the basis of previous andpresent defocus amounts; determining means for calculating a change indefocus amount caused by movement of an object on the basis of previousand present defocus amounts and determining on the basis of thecalculated change whether or not an object is moving; lens drive meansfor driving the lens on the basis of the present defocus amount whensaid determining means determines that the object is not moving, anddriving the lens on the basis of the present corrected defocus amountwhen said determining means determines that the object is moving; andmeans for inhibiting said lens drive means from driving the lens on thebasis of the present corrected defocus amount when the signs of previouscorrected defocus amount and present defocus amount are different fromeach other and the absolute value of the present defocus amount isgreater than a predetermined value.
 6. An automatic focusing apparatuscomprising:a focusing device for repetitively detecting a defocus amountof a photographing lens; a moving object discriminating device fordiscriminating on the basis of present and previous defocus amountswhether or not an object is moving; a pursuit correction amountcalculating device for calculating a pursuit correction amount for amoving object on the basis of the present and previous defocus amounts;a lens drive device for calculating a drive amount of said photographinglens on the basis of the present defocus amount when said moving objectdiscriminating device discriminates that the object is not moving, andfor calculating the drive amount of said photographing lens on the basisof a pursuit drive amount as a sum of the present defocus amount and thepursuit correction amount when said moving object discriminating devicediscriminates that the object is moving, so as to drive saidphotographing lens; and a pursuit enable/disable determining device fordetermining whether said lens drive device calculates the drive amountof said photographing lens on the basis of the discrimination result ofsaid moving object discriminating device or calculates the drive amountof said photographing lens on the basis of the present defocus amount,wherein when a drive direction of said photographing lens is reversed,said pursuit enable/disable determining device causes said lens drivedevice to calculate the drive amount of said photographing lens on thebasis of the present defocus amount to drive said photographing lens ina predetermined number of drive operations after the reversal.
 7. Anautomatic focusing apparatus comprising:a focusing device forrepetitively detecting a defocus amount of a photographing lens; adevice for calculating a change in defocus amount caused by movement ofan object on the basis of previous and present defocus amounts; adriving device for driving said photographing lens on the basis of adefocus amount; and a correcting device for correcting the detecteddefocus amount of the photographing lens on the basis of the calculatedchange, wherein when a drive direction of said photographing lens isreversed, said correcting device does not correct the detected defocusamount in a predetermined number of drive operations after the reversal,and wherein when said predetermined number of drive operations after thereversal have been completed, said correcting device corrects thedetected defocus amount.
 8. An automatic focusing apparatus comprising:afocusing device for repetitively detecting a defocus amount of aphotographing lens; a moving object discriminating device fordiscriminating on the basis of present and previous defocus amountswhether or not an object is moving; a pursuit correction amountcalculating device for calculating a pursuit correction amount for amoving object on the basis of the present and previous defocus amounts;a lens drive device for calculating a drive amount of said photographinglens on the basis of the present defocus amount when said moving objectdiscriminating device discriminates that the object is not moving, andfor calculating the drive amount of said photographing lens on the basisof a pursuit drive amount as a sum of the present defocus amount and thepursuit correction amount when said moving object is moving, so as todrive said photographing lens; a pursuit enable/disable determiningdevice for determining whether said lens drive device calculates thedrive amount of said photographing lens on the basis of thediscrimination result of said moving object discriminating device orcalculates the drive amount of said photographing lens on the basis ofthe present defocus amount, wherein when a drive direction of saidphotographing lens is reversed, said pursuit enable/disable determiningdevice causes said lens drive device to calculate the drive amount ofsaid photographing lens on the basis of the present defocus amount todrive said photographing lens in a predetermined number of driveoperations after the reversal; and a driving control device fordetecting that the present defocus amount is within a predeterminedamount, said driving control device inhibiting the drive operation ofsaid lens drive device corresponding to the present defocus amount whenthe present defocus among is within a predetermined amount, wherein saidpursuit enable/disable determining device, after the inhibiting of theoperation of said driving control device, causes said lens drive deviceto calculate the drive amount of said photographing lens on the basis ofthe present defocus amount.
 9. An automatic focusing apparatuscomprising:a focusing device for repetitively detecting a defocus amountof a photographing lens; a correcting device for correcting said defocusamount of the lens on the basis of previous and present defocus amounts;and a lens drive device for driving the lens on the basis of the presentcorrected defocus amount when an absolute value of the sum of theprevious and present defocus amounts is larger than a predeterminedvalue.
 10. An automatic focusing apparatus comprising:a focusing devicefor repetitively detecting a defocus amount of a photographing lens; acorrecting device for correcting said defocus amount of the lens on thebasis of previous and present defocus amounts; a determining device forcalculating a change in defocus amount caused by movement of an objecton the basis of previous and present defocus amounts and determining onthe basis of the calculated change whether or not an object is moving; alens drive device for driving the lens on the basis of the presentdefocus amount when said determining device determines that the objectis not moving, and driving the lens on the basis of the presentcorrected defocus amount when said determining device determines thatthe object is moving; and a device for inhibiting said lens drive devicefrom driving the lens on the basis of the present corrected defocusamount when the signs of previous corrected defocus amount and presentdefocus amount are different from each other and the absolute value ofthe present defocus amount is greater than a predetermined value.
 11. Anautomatic focus adjustment apparatus comprising:a focus detectioncircuit for repetitively detecting a focus adjustment state of an objectimage formed by a main optical system, and for sequentially generatingfocus detection signals in accordance with the detected focus adjustmentstate; a driving circuit for driving said main optical system along anoptical axis direction; a first driving control circuit for controllingsaid driving circuit so as to pursue a time-lapsed variation of anobject image plane caused by movement of an object, on the basis of aplurality of the focus detection signals sequentially generated; asecond driving control circuit for controlling said driving circuit inrelation to a still object on the basis of the focus detection signalssequentially generated; and a selecting circuit for selecting said firstor said second driving control circuit, wherein said selecting circuitselects said second driving control circuit just after a drive directionof said driving means is reversed.
 12. An automatic focus adjustmentapparatus comprising:a focus detection circuit for repetitivelydetecting a focus adjustment state of an object image formed by a mainoptical system, and for sequentially generating focus detection signalsin accordance with the detected focus adjustment state; a drivingcircuit for driving said main optical system along an optical axisdirection; and a driving control circuit for controlling said drivingcircuit so as to pursue a time-lapsed variation of an object image planecaused by a movement of an object, on the basis of a plurality of thefocus detection signals sequentially generated; wherein said drivingcontrol circuit inhibits the next drive control of said driving controlcircuit, if a drive direction of said driving circuit is reversed. 13.An automatic focus adjustment apparatus comprising:a focus detectioncircuit for repetitively detecting a focus adjustment state of an objectimage formed by a main optical system, and for sequentially generatingfocus detection signals in accordance with the detected focus adjustmentstate; a driving circuit for driving said main optical system along anoptical axis direction; a driving control circuit for controlling saiddriving circuit so as to pursue a time-lapsed variation of an objectimage plane caused by movement of an object, on the basis of a pluralityof the focus detection signals sequentially generated; and an inhibitingcircuit for inhibiting the drive control of said driving controlcircuit, if said driving circuit does not drive said main opticalsystem.
 14. An automatic focus adjustment apparatus comprising:aphotoelectric conversion device for receiving an object image formed bya main optical system, and for generating an object image signal; afocus detection circuit for repetitively detecting a focus adjustmentstate of said main optical system on the basis of the object imagesignal, and for indicating a defocus amount and a defocus directionaccording to the focus detection state; a movement information detectioncircuit for detecting movement information including a movementdirection of an object image plane caused by movement of an object, onthe basis of a plurality of the focus detection signals sequentiallygenerated; a driving circuit for driving said main optical system forpursuing the movement of the object on the basis of the movementinformation; and an inhibiting circuit for inhibiting the pursuit driveof said driving circuit when the defocus direction is different from themovement direction in the movement information and the defocus amount isequal to or greater than a predetermined value.